sched/fair: Reverse ILB pick loop iteration order
CFS's CPU selection mostly tries to fill CPUs in an ascending order.
For instance, when there are idle CPUs, should_we_balance() only lets the
first idle CPU in the group mask run the balance, which will (most of the
time) pull tasks towards itself.
select_idle_sibling() is a bit more treacherous in that it starts from a
task's prev CPU, but it also scans CPUs upwards (...until it wraps
around).
To reduce cases where CFS task placement clashes with NOHZ ILB selection,
make ILB selection start from the highest-numbered NOHZ idle CPU and
iterate downwards.
Signed-off-by:
Valentin Schneider <valentin.schneider@arm.com>
Loading
Please register or sign in to comment