2023-06-13 04:31:08

by Ricardo Neri

[permalink] [raw]
Subject: [PATCH v4 05/24] sched/core: Update the IPC class of the current task

When supported, hardware monitors the instruction stream to classify the
current task. Hence, at userspace tick, we are ready to read the most
recent classification result for the current task.

Cc: Ben Segall <[email protected]>
Cc: Daniel Bristot de Oliveira <[email protected]>
Cc: Dietmar Eggemann <[email protected]>
Cc: Ionela Voinescu <[email protected]>
Cc: Joel Fernandes (Google) <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Lukasz Luba <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Perry Yuan <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Srinivas Pandruvada <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Tim C. Chen <[email protected]>
Cc: Valentin Schneider <[email protected]>
Cc: Zhao Liu <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Ricardo Neri <[email protected]>
---
Changes since v3:
* None

Changes since v2:
* None

Changes since v1:
* Removed argument smt_siblings_idle from call to arch_ipcc_update().
* Used the new IPCC interfaces names.
---
kernel/sched/core.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 6ac53f01d989..876396b1d077 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5651,6 +5651,9 @@ void scheduler_tick(bool user_tick)
if (housekeeping_cpu(cpu, HK_TYPE_TICK))
arch_scale_freq_tick();

+ if (sched_ipcc_enabled() && user_tick)
+ arch_update_ipcc(curr);
+
sched_clock_tick();

rq_lock(rq, &rf);
--
2.25.1