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? <roger.pau@citrix.com>
Discussed with:	jilles
Tested by:	pho
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2013-06-03 17:36:43 +00:00
parent bb23de67bb
commit d39116f5d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251322

View File

@ -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;
}