git: kernel -- Per-mount syncer thread infrastructure.

Venkatesh Srinivas vsrinivas at crater.dragonflybsd.org
Mon Dec 26 08:47:59 PST 2011


commit 50e4012a4b55e1efc595db0db397b4365f08b640
Author: Venkatesh Srinivas <me at endeavour.zapto.org>
Date:   Mon Dec 26 00:12:14 2011 -0800

    kernel -- Per-mount syncer thread infrastructure.
    
    Introduce infrastructure to create per-mount periodic filesystem syncer threads.
    
    For a filesystem flagged MNTK_THR_SYNC, create a thread to periodically
    synchronize dirty vnodes and the entire filesystem via VOP_FSYNC and
    VFS_SYNC. This thread subsumes that responsibility from the global syncer.
    The thread will be created at mount time and torn down at unmount.
    
    For filesystems not flagged, the global syncer thread (syncer0) is still used.
    The global syncer thread is also used for the bioops_sync(NULL) call, to
    invoke every filesystem's bioops_sync path. This is primarily a concern for
    UFS/softdep. The global syncer is also the only syncer thread to respond to
    speedup_syncer / rushjob requests; this is again a consideration for softdep.
    
    Future work will consider the relative phase of the syncer thread clocks,
    so that they may wake together; this may result in more work done per
    wakeup.
    
    Currently no filesystems are flagged MNTK_THR_SYNC, so there should be no
    functional change associated with this commit.

Summary of changes:
 sys/kern/kern_synch.c |    4 +-
 sys/kern/vfs_sync.c   |  199 ++++++++++++++++++++++++++++++++++++++++---------
 sys/kern/vfs_vfsops.c |    8 ++
 sys/sys/kernel.h      |    2 +-
 sys/sys/mount.h       |    2 +
 sys/sys/vnode.h       |    4 +
 6 files changed, 181 insertions(+), 38 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/50e4012a4b55e1efc595db0db397b4365f08b640


-- 
DragonFly BSD source repository





More information about the Commits mailing list