sched: Introduce system-wide sched_energy
The Energy-aware algorithm needs system wide sched energy information on
certain platforms (e.g. a one socket system with multiple cpus).
In such a system, the sched energy data is only attached to the sched
groups for the individual cpus in the sched domain MC level.
For those systems, this patch adds a _hack_ to provide system-wide sched
energy data via the sched_domain_topology_level table.
The problem is that the sched_domain_topology_level table is not an
interface to provide system-wide data but we want to keep the
configuration of all sched energy related data in one place.
The sched_domain_energy_f of the last entry (the one which is
initialized with {NULL, }) of the sched_domain_topology_level table is
set to cpu_sys_energy(). Since the sched_domain_mask_f of this entry
stays NULL it is still not considered for the existing scheduler set-up
code (see for_each_sd_topology()).
A second call to init_sched_energy() with a struct sched_domain pointer
equal NULL as an argument will initialize the system-wide sched energy
structure sse.
For the example platform (ARM TC2 (MC and DIE sd level)), the
system-wide sched_domain_energy_f returns NULL, so struct sched_energy
*sse stays NULL.
Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
Loading
Please register or sign in to comment