]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In vfs_msync(), test to see if the vnode being examined is "interesting"
authorPeter Wemm <peter@FreeBSD.org>
Sat, 18 Apr 1998 06:26:16 +0000 (06:26 +0000)
committerPeter Wemm <peter@FreeBSD.org>
Sat, 18 Apr 1998 06:26:16 +0000 (06:26 +0000)
commit37b8ccd37a40d96cde47ef5c83b7a3eeca20da21
tree5d3a5d620b0d437936d60bca837956c5cc95f9bb
parent141d52a90073a0c04e2c56d1ec3e78cbba70b3b3
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