sched/fair: Use eas_cache to speed up find_energy_efficient_cpu()
Use the pd_cache buffers to save and re-use invariant utilization
values when trying to place a task on the most energy efficient
CPU.
For each perf_domain:
- Compute the "base" per CPU frequency and energy utilization
values (i.e. when the task is not placed on the CPU). Then save
them in the pd_cache buffer.
- Compute the "base" estimated power consumption by using the
base utilization values previously cached.
- Find the CPU with the most spare capacity in the pd. This is
max_spare_cap_cpu.
- Compute the estimated power consumption for max_spare_cap_cpu if
the task was placed there. The utilization values of
max_spare_cap_cpu need to be re-computed. The others can be
fetched from the pd_cache.
- If the prev_cpu of the task is in the pd, compute its estimated
power consumption similarly to max_spare_cap_cpu.
Signed-off-by:
Pierre Gondois <Pierre.Gondois@arm.com>
Loading
Please register or sign in to comment