- Set steal_thresh to log2(ncpus). This improves idle-time load balancing
on 2cpu machines by reducing it to 1 by default. This improves loaded operation on 8cpu machines by increasing it to 3 where the extra idle time is not as critical. Approved by: re
This commit is contained in:
parent
62db376af3
commit
9862717afe
@ -1328,6 +1328,12 @@ sched_initticks(void *dummy)
|
||||
incr = 1;
|
||||
tickincr = incr;
|
||||
#ifdef SMP
|
||||
/*
|
||||
* Set steal thresh to log2(mp_ncpu) but no greater than 4. This
|
||||
* prevents excess thrashing on large machines and excess idle on
|
||||
* smaller machines.
|
||||
*/
|
||||
steal_thresh = min(ffs(mp_ncpus) - 1, 4);
|
||||
affinity = SCHED_AFFINITY_DEFAULT;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user