Skip to content
Commit dcfc707c authored by Pierre Gondois's avatar Pierre Gondois Committed by Deepak Kumar Mishra
Browse files

sched/fair: Check if prev_cpu has most spared cap in feec()



When evaluating the CPU candidates in the perf domain (pd) containing
the previously used CPU (prev_cpu), the find_energy_efficient_cpu()
evaluates the energy of the pd without the task (base_energy), with
the task placed on the CPU with the most spared capacity
(max_spare_cap_cpu), and with the task placed on prev_cpu.

prev_cpu is excluded when searching max_spare_cap_cpu. If prev_cpu
is already the CPU with the most spared capacity, max_spare_cap_cpu
will be the CPU with the second most spared capacity.

To avoid evaluating a CPU that won't be be selected, check whether
prev_cpu is the CPU with the most spared capacity, and in such case
only consider prev_cpu in the pd.

Signed-off-by: Pierre Gondois's avatarPierre Gondois <pierre.gondois@arm.com>
parent 4df0c1be
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