Skip to content
Commit 0c2b84ca authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Deepak Kumar Mishra
Browse files

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's avatarDietmar Eggemann <dietmar.eggemann@arm.com>
parent f4d41c8f
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