]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r336855
authortruckman <truckman@FreeBSD.org>
Sun, 12 Aug 2018 03:22:28 +0000 (03:22 +0000)
committertruckman <truckman@FreeBSD.org>
Sun, 12 Aug 2018 03:22:28 +0000 (03:22 +0000)
commite2d93727643b74f67085eb874430e0e9eeb57641
tree17427e8a2a1b6b1f8f073d1c752f932740ef4081
parent603bdee985ca145c979d2e2524c1f3bce8fcdce4
MFC r336855

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
sys/kern/sched_ule.c