kernel -- Per-mount syncer thread infrastructure.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Mon, 26 Dec 2011 08:12:14 +0000 (00:12 -0800)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Mon, 26 Dec 2011 08:12:14 +0000 (00:12 -0800)
commit50e4012a4b55e1efc595db0db397b4365f08b640
tree59008123b7d6e28f39b28eb4f70cee8a59725bf1
parent7050f2f38be098c652500555701a381176e0ee8f
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.
sys/kern/kern_synch.c
sys/kern/vfs_sync.c
sys/kern/vfs_vfsops.c
sys/sys/kernel.h
sys/sys/mount.h
sys/sys/vnode.h