]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In vfs_msync(), test to see if the vnode being examined is "interesting"
authorpeter <peter@FreeBSD.org>
Sat, 18 Apr 1998 06:26:16 +0000 (06:26 +0000)
committerpeter <peter@FreeBSD.org>
Sat, 18 Apr 1998 06:26:16 +0000 (06:26 +0000)
commitbbf574dac9bac884a45d3fbd7f1b2ee9a74903ef
tree2d269de2a79af5dc637172467135a4857e29c592
parent73c489feda99a875404deaa2730fd3978496c38f
In vfs_msync(), test to see if the vnode being examined is "interesting"
(ie: it has a vm_object attached and is marked as OBJ_MIGHTBEDIRTY) before
attempting to lock it.  This should reduce the cpu hit that is incurred
when doing a sync(2) and when the syncer process is doing the 30-second
writeback of dirty mmap() data to disk.  Skip this speedup if we are
doing an unmount() to be sure to get everything - we can afford to
occasionally miss a msync while the system is running, but not at unmount.

I'm not sure about the VXLOCK and MNT_WAIT case, it seems a bit odd to skip
doing a page_clean at unmount time just because a vnode is VXLOCKed, but
that's what was being done before...
sys/kern/vfs_export.c
sys/kern/vfs_subr.c