]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the long term ULE load balancer so that it actually works. The
authortruckman <truckman@FreeBSD.org>
Sun, 29 Jul 2018 00:30:06 +0000 (00:30 +0000)
committertruckman <truckman@FreeBSD.org>
Sun, 29 Jul 2018 00:30:06 +0000 (00:30 +0000)
commitdf474a2321bf4f467ca478ce3f8b9e219c11f4a7
tree6a99c80cfb648d9aba872c341b9f8236eb6f0f79
parent48569dc7bd2026122370967d5d2eda028410838d
Fix the long term ULE load balancer so that it actually works.  The
initial call to sched_balance() during startup is meant to initialize
balance_ticks, but does not actually do that since smp_started is
still zero at that time.  Since balance_ticks does not get set,
there are no further calls to sched_balance().  Fix this by setting
balance_ticks in sched_initticks() since we know the value of
balance_interval at that time, and eliminate the useless startup
call to sched_balance().  We don't need to randomize the intial
value of balance_ticks.

Since there is now only one call to sched_balance(), we can hoist
the tests at the top of this function out to the caller and avoid
the overhead of the function call when running a SMP kernel on UP
hardware.

PR: 223914
Reviewed by: kib
MFC after: 2 weeks
sys/kern/sched_ule.c