[Midnightbsd-cvs] src [8166] trunk/sys/kern/sched_ule.c: Allow idle threads to steal second threads from other cores on systems with

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Sep 16 22:33:10 EDT 2016


Revision: 8166
          http://svnweb.midnightbsd.org/src/?rev=8166
Author:   laffer1
Date:     2016-09-16 22:33:10 -0400 (Fri, 16 Sep 2016)
Log Message:
-----------
Allow idle threads to steal second threads from other cores on systems with
8 or more cores to improve utilization.  None of my tests on 2xXeon (2x6x2)
system shown any slowdown from mentioned "excess thrashing".  Same time in
pbzip2 test with number of threads more then number of CPUs I see up to 10%
speedup with SMT disabled and up 5% with SMT enabled.  Thinking about
trashing I was trying to limit that stealing within same last level cache,
but got only worse results.  Present code any way prefers to steal threads
from topologically closer cores.

Modified Paths:
--------------
    trunk/sys/kern/sched_ule.c

Modified: trunk/sys/kern/sched_ule.c
===================================================================
--- trunk/sys/kern/sched_ule.c	2016-09-17 02:31:00 UTC (rev 8165)
+++ trunk/sys/kern/sched_ule.c	2016-09-17 02:33:10 UTC (rev 8166)
@@ -1404,12 +1404,6 @@
 	 * what realstathz is.
 	 */
 	balance_interval = realstathz;
-	/*
-	 * Set steal thresh to roughly log2(mp_ncpu) but no greater than 4. 
-	 * This prevents excess thrashing on large machines and excess idle 
-	 * on smaller machines.
-	 */
-	steal_thresh = min(fls(mp_ncpus) - 1, 3);
 	affinity = SCHED_AFFINITY_DEFAULT;
 #endif
 	if (sched_idlespinthresh < 0)



More information about the Midnightbsd-cvs mailing list