sched/topology: Move perf domains from root domain to rq
Perf Domains (PDs) are currently attached as a single linked list to
Root Domains (RDs). Today's PD incarnations are congruent to Frequency
Domains, i.e. a PD cpumask corresponds to a CPUfreq policy mask.
Energy Aware Scheduling (EAS) iterates over all CPUs of the asymmetric
CPU capacity Sched Domain (sd_asym_cpucapacity) following that list,
one PD cpumask (CPUfreq policy mask) after the other.
By dereferencing rd->pd in find_energy_efficient_cpu() (feec()) this
iteration order over the PDs (and ultimately over the CPUs) is always
the same, regardless of this_cpu or prev_cpu.
To allow starting the CPU iteration at any CPUx, arrange the PDs in a
circular linked list and attach the PD spanning CPUx to cpu_rq(CPUx).
Refcounting is not used to manage the freeing of old PDs. Instead the
PD list is only freed for the first CPU of cpu_map (see
cpu_attach_perf_domain()).
Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
Loading
Please register or sign in to comment