diff options
author | Valentin Schneider <valentin.schneider@arm.com> | 2020-07-12 17:59:15 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-07-22 10:22:05 +0200 |
commit | 25980c7a79af42f2daa73e2f475ebf4cbac8253e (patch) | |
tree | e22a255eca9698525da7ea6e9de531bfefcf1f6b /kernel/sched/core.c | |
parent | 2705937a0395bd15d515a2a302d26ebc8318c035 (diff) | |
download | linux-25980c7a79af42f2daa73e2f475ebf4cbac8253e.tar.gz linux-25980c7a79af42f2daa73e2f475ebf4cbac8253e.tar.bz2 linux-25980c7a79af42f2daa73e2f475ebf4cbac8253e.zip |
arch_topology, sched/core: Cleanup thermal pressure definition
The following commit:
14533a16c46d ("thermal/cpu-cooling, sched/core: Move the arch_set_thermal_pressure() API to generic scheduler code")
moved the definition of arch_set_thermal_pressure() to sched/core.c, but
kept its declaration in linux/arch_topology.h. When building e.g. an x86
kernel with CONFIG_SCHED_THERMAL_PRESSURE=y, cpufreq_cooling.c ends up
getting the declaration of arch_set_thermal_pressure() from
include/linux/arch_topology.h, which is somewhat awkward.
On top of this, sched/core.c unconditionally defines
o The thermal_pressure percpu variable
o arch_set_thermal_pressure()
while arch_scale_thermal_pressure() does nothing unless redefined by the
architecture.
arch_*() functions are meant to be defined by architectures, so revert the
aforementioned commit and re-implement it in a way that keeps
arch_set_thermal_pressure() architecture-definable, and doesn't define the
thermal pressure percpu variable for kernels that don't need
it (CONFIG_SCHED_THERMAL_PRESSURE=n).
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200712165917.9168-2-valentin.schneider@arm.com
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 12db8fbd9c97..bd8e5211d31f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3869,17 +3869,6 @@ unsigned long long task_sched_runtime(struct task_struct *p) return ns; } -DEFINE_PER_CPU(unsigned long, thermal_pressure); - -void arch_set_thermal_pressure(struct cpumask *cpus, - unsigned long th_pressure) -{ - int cpu; - - for_each_cpu(cpu, cpus) - WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure); -} - /* * This function gets called by the timer code, with HZ frequency. * We call it with interrupts disabled. |