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 <pierre.gondois@arm.com>
Loading
Please register or sign in to comment