Skip to content
Commit cd22d431 authored by Pierre Gondois's avatar Pierre Gondois
Browse files

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: default avatarPierre Gondois <Pierre.Gondois@arm.com>
parent f122db62
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