summaryrefslogtreecommitdiff
path: root/include/linux/sched
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/sched
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff)
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/sched')
-rw-r--r--include/linux/sched/topology.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index c07bfa2d80f2..6e89a8e43aa7 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -273,6 +273,13 @@ void arch_set_thermal_pressure(const struct cpumask *cpus,
{ }
#endif
+#ifndef arch_update_thermal_pressure
+static __always_inline
+void arch_update_thermal_pressure(const struct cpumask *cpus,
+ unsigned long capped_frequency)
+{ }
+#endif
+
static inline int task_node(const struct task_struct *p)
{
return cpu_to_node(task_cpu(p));