2020-02-22 00:52:40

by Thara Gopinath

[permalink] [raw]
Subject: [Patch v10 2/9] sched/topology: Add hook to read per cpu thermal pressure.

Introduce arch_scale_thermal_pressure to retrieve per cpu thermal
pressure.

Signed-off-by: Thara Gopinath <[email protected]>
---
v6->v7:
- Renamed arch_scale_thermal_capacity to arch_cpu_thermal_pressure
as per review comments from Peter, Dietmar and Ionela.
v9->v10:
- Renamed arch_cpu_thermal_pressure to arch_scale_thermal_pressure
as per review comments from Dietmar.

include/linux/sched/topology.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index f341163fedc9..af9319e4cfb9 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -225,6 +225,14 @@ unsigned long arch_scale_cpu_capacity(int cpu)
}
#endif

+#ifndef arch_scale_thermal_pressure
+static __always_inline
+unsigned long arch_scale_thermal_pressure(int cpu)
+{
+ return 0;
+}
+#endif
+
static inline int task_node(const struct task_struct *p)
{
return cpu_to_node(task_cpu(p));
--
2.20.1


Subject: [tip: sched/core] sched/topology: Add callback to read per CPU thermal pressure

The following commit has been merged into the sched/core branch of tip:

Commit-ID: 36a0df85d2e85e1929e8cd607e19243e5a2754e7
Gitweb: https://git.kernel.org/tip/36a0df85d2e85e1929e8cd607e19243e5a2754e7
Author: Thara Gopinath <[email protected]>
AuthorDate: Fri, 21 Feb 2020 19:52:06 -05:00
Committer: Ingo Molnar <[email protected]>
CommitterDate: Fri, 06 Mar 2020 12:57:17 +01:00

sched/topology: Add callback to read per CPU thermal pressure

Introduce the arch_scale_thermal_pressure() callback to retrieve per CPU thermal
pressure.

Signed-off-by: Thara Gopinath <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
include/linux/sched/topology.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index f341163..af9319e 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -225,6 +225,14 @@ unsigned long arch_scale_cpu_capacity(int cpu)
}
#endif

+#ifndef arch_scale_thermal_pressure
+static __always_inline
+unsigned long arch_scale_thermal_pressure(int cpu)
+{
+ return 0;
+}
+#endif
+
static inline int task_node(const struct task_struct *p)
{
return cpu_to_node(task_cpu(p));