summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2012-04-20 07:00:28 +0000
committermckusick <mckusick@FreeBSD.org>2012-04-20 07:00:28 +0000
commitd9895ac1fe988335e2619f56d942d954d835bb07 (patch)
tree10f55b579602c4e2bd1320448bee01fb50952a9d /sys/ufs/ffs/ffs_vfsops.c
parent5b7b29e35b332608560671cf15919cf03d76f9ca (diff)
downloadFreeBSD-src-d9895ac1fe988335e2619f56d942d954d835bb07.zip
FreeBSD-src-d9895ac1fe988335e2619f56d942d954d835bb07.tar.gz
This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops
over just the active vnodes associated with a mount point to replace MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync routines. The vfs_msync routine is run every 30 seconds for every writably mounted filesystem. It ensures that any files mmap'ed from the filesystem with modified pages have those pages queued to be written back to the file from which they are mapped. The ffs_lazy_sync and qsync routines are run every 30 seconds for every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine ensures that any files that have been accessed in the previous 30 seconds have had their access times queued for updating in the filesystem. The qsync routine ensures that any files with modified quotas have those quotas queued to be written back to their associated quota file. In a system configured with 250,000 vnodes, less than 1000 are typically active at any point in time. Prior to this change all 250,000 vnodes would be locked and inspected twice every minute by the syncer. For UFS/FFS filesystems they would be locked and inspected six times every minute (twice by each of these three routines since each of these routines does its own pass over the vnodes associated with a mount point). With this change the syncer now locks and inspects only the tiny set of vnodes that are active. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 7faf018..974d27a 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1432,7 +1432,7 @@ ffs_sync_lazy(mp)
td = curthread;
if ((mp->mnt_flag & MNT_NOATIME) != 0)
goto qupdate;
- MNT_VNODE_FOREACH_ALL(vp, mp, mvp) {
+ MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) {
if (vp->v_type == VNON) {
VI_UNLOCK(vp);
continue;
OpenPOWER on IntegriCloud