sched: Remove rq->cpu_capacity_orig and capacity_orig_of()
Currently there are two different ways to get the original (maximum)
capacity of a CPU within the task scheduler and in other subsystems
(Energy Model, Cpufreq cooling).
(a) Get rq->cpu_capacity_orig via capacity_orig_of().
(b) Get SCHED_CAPACITY_SCALE via the default arch_scale_cpu_capacity()
for SMP or the per-cpu cpu_scale via topology_update_cpu_topology()
which defines arch_scale_cpu_capacity() on arm/arm64 systems
arm/arm64 systems.
Cleanup by using only 1 way. Remove (a) and transfer all users to (b).
Reasons for doing this and not vice versa are:
(1) The default SMP implementation of arch_scale_cpu_capacity()
[include/linux/sched/topology.h] is a compile-time constant.
(2) capacity_orig_of() is only defined for CONFIG_SMP. The task
scheduler needs it for !CONFIG_SMP as well in update_curr_dl().
(3) capacity_orig_of() is only defined for the task scheduler
[kernel/sched/sched.h]. It shouldn't be exported wider since struct
rq internals, like cpu_capacity_orig, shouldn't be exposed.
Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
Loading
Please register or sign in to comment