Skip to content
Commit 8ba00b9a authored by Valentin Schneider's avatar Valentin Schneider
Browse files

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: default avatarValentin Schneider <valentin.schneider@arm.com>
parent ac7cff12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment