summaryrefslogtreecommitdiffstats
path: root/include/linux/arch_topology.h
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2021-11-09 19:57:10 +0000
committerViresh Kumar <viresh.kumar@linaro.org>2021-11-23 15:10:26 +0530
commitc214f124161d446b340597e7c968e0a2dc149142 (patch)
treee3421d0fd8a1b0d91c8e5609aaadf3a44d8f129f /include/linux/arch_topology.h
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff)
downloadlinux-c214f124161d446b340597e7c968e0a2dc149142.tar.gz
linux-c214f124161d446b340597e7c968e0a2dc149142.tar.bz2
linux-c214f124161d446b340597e7c968e0a2dc149142.zip
arch_topology: Introduce thermal pressure update function
The thermal pressure is a mechanism which is used for providing information about reduced CPU performance to the scheduler. Usually code has to convert the value from frequency units into capacity units, which are understandable by the scheduler. Create a common conversion code which can be just used via a handy API. Internally, the topology_update_thermal_pressure() operates on frequency in MHz and max CPU frequency is taken from 'freq_factor' (per-cpu). Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/arch_topology.h')
-rw-r--r--include/linux/arch_topology.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h
index b97cea83b25e..ace1e5dcf773 100644
--- a/include/linux/arch_topology.h
+++ b/include/linux/arch_topology.h
@@ -59,6 +59,9 @@ static inline unsigned long topology_get_thermal_pressure(int cpu)
void topology_set_thermal_pressure(const struct cpumask *cpus,
unsigned long th_pressure);
+void topology_update_thermal_pressure(const struct cpumask *cpus,
+ unsigned long capped_freq);
+
struct cpu_topology {
int thread_id;
int core_id;