summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-03-23 13:45:24 +0000
committerkib <kib@FreeBSD.org>2008-03-23 13:45:24 +0000
commit5ddf5664ccd9a5fa53eda81e8ec89445bfaf3c41 (patch)
tree72ecaa475ca0981f6c6e503a2d9814052b1078e5 /sys/kern/vfs_mount.c
parent5e55dd67176633e7adc6e3726f22960f15941c9a (diff)
downloadFreeBSD-src-5ddf5664ccd9a5fa53eda81e8ec89445bfaf3c41.zip
FreeBSD-src-5ddf5664ccd9a5fa53eda81e8ec89445bfaf3c41.tar.gz
Yield the cpu in the kernel while iterating the list of the
vnodes belonging to the mountpoint. Also, yield when in the softdep_process_worklist() even when we are not going to sleep due to buffer drain. It is believed that the ULE fixed the problem [1], but the yielding seems to be needed at least for the 4BSD case. Discussed: on stable@, with bde Reviewed by: tegge, jeff [1] MFC after: 2 weeks
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 0f829a9..3961022 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -2008,6 +2008,12 @@ __mnt_vnode_next(struct vnode **mvp, struct mount *mp)
mtx_assert(MNT_MTX(mp), MA_OWNED);
KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
+ if ((*mvp)->v_yield++ == 500) {
+ MNT_IUNLOCK(mp);
+ (*mvp)->v_yield = 0;
+ uio_yield();
+ MNT_ILOCK(mp);
+ }
vp = TAILQ_NEXT(*mvp, v_nmntvnodes);
while (vp != NULL && vp->v_type == VMARKER)
vp = TAILQ_NEXT(vp, v_nmntvnodes);
OpenPOWER on IntegriCloud