sched/fair: Stabilize asym cpu capacity system idle cpu selection
authorVincent Guittot <vincent.guittot@linaro.org>
Tue, 11 Jul 2023 08:13:59 +0000 (10:13 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 13 Jul 2023 13:21:53 +0000 (15:21 +0200)
commit7ee7642c91410fb90cc45e799a3a46e1607ecd79
treef7341b13798fe92abf0c980e3d8ce034f9a6f735
parented74cc4995d314ea6cbf406caf978c442f451fa5
sched/fair: Stabilize asym cpu capacity system idle cpu selection

select_idle_capacity() not only looks for an idle cpu that fits for the
waking task but also for cpu with highest bandwidth when no cpu fits.
Start the loop with target cpu so it will be selected 1st when no cpu fits
but several cpus shared the same bandwidth. Starting with target cpu
prevents the task to migrate between cpus with same bandwidth at every
wakeup when no cpu fits.

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