svn commit: r251322 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Jun 3 17:36:44 UTC 2013
Author: kib
Date: Mon Jun 3 17:36:43 2013
New Revision: 251322
URL: http://svnweb.freebsd.org/changeset/base/251322
Log:
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 at citrix.com>
Discussed with: jilles
Tested by: pho
MFC after: 2 weeks
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Mon Jun 3 17:36:26 2013 (r251321)
+++ head/sys/kern/vfs_subr.c Mon Jun 3 17:36:43 2013 (r251322)
@@ -4693,7 +4693,7 @@ restart:
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;
}
More information about the svn-src-all
mailing list