diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sched_ule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 8569bcd..a2c33dd 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -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 } |