]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair : Improve update_sd_pick_busiest for spare capacity case
authorVincent Guittot <vincent.guittot@linaro.org>
Fri, 20 Dec 2019 11:04:53 +0000 (12:04 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 17 Jan 2020 09:19:19 +0000 (10:19 +0100)
commit583693d06da9d44c803a43321adfb7ee4e05f3ec
tree6cfc6190c838f5a254336451b1fa254ce2eecddf
parentebc0021b52f63c1b50d6517c9b0d5f2d7a4c4480
sched/fair : Improve update_sd_pick_busiest for spare capacity case

Similarly to calculate_imbalance() and find_busiest_group(), using the
number of idle CPUs when there is only 1 CPU in the group is not efficient
because we can't make a difference between a CPU running 1 task and a CPU
running dozens of small tasks competing for the same CPU but not enough
to overload it. More generally speaking, we should use the number of
running tasks when there is the same number of idle CPUs in a group instead
of blindly select the 1st one.

When the groups have spare capacity and the same number of idle CPUs, we
compare the number of running tasks to select the busiest group.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/1576839893-26930-1-git-send-email-vincent.guittot@linaro.org
kernel/sched/fair.c