From d39116f5d59f7133e569aa0bcb21b2474c41510d Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 3 Jun 2013 17:36:43 +0000 Subject: [PATCH] Be more generous when donating the current thread time to the owner of the vnode lock while iterating over the free vnode list. Instead of yielding, pause for 1 tick. The change is reported to help in some virtualized environments. Submitted by: Roger Pau Monn? Discussed with: jilles Tested by: pho MFC after: 2 weeks --- sys/kern/vfs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1f4a838fbd42..e64f379bdbdb 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4693,7 +4693,7 @@ mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) if (mp_ncpus == 1 || should_yield()) { TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); - kern_yield(PRI_USER); + pause("vnacti", 1); mtx_lock(&vnode_free_list_mtx); goto restart; }