[PATCH 05/17] sched/fair: Add paravirt movements for proc sched file
Shrikanth Hegde
sshegde at linux.ibm.com
Wed Nov 19 23:44:37 AEDT 2025
Add couple of new stats.
- nr_migrations_paravirt: number of migrations due to current task being
moved out of paravirt CPU.
- nr_wakeups_paravirt - number of wakeups where previous CPU was marked
as paravirt and hence task is being woken up on current CPU.
Signed-off-by: Shrikanth Hegde <sshegde at linux.ibm.com>
---
include/linux/sched.h | 2 ++
kernel/sched/debug.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f802bfd7120f..3628edd1468b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -549,6 +549,7 @@ struct sched_statistics {
u64 nr_failed_migrations_running;
u64 nr_failed_migrations_hot;
u64 nr_forced_migrations;
+ u64 nr_migrations_paravirt;
u64 nr_wakeups;
u64 nr_wakeups_sync;
@@ -557,6 +558,7 @@ struct sched_statistics {
u64 nr_wakeups_remote;
u64 nr_wakeups_affine;
u64 nr_wakeups_affine_attempts;
+ u64 nr_wakeups_paravirt;
#ifdef CONFIG_SCHED_CORE
u64 core_forceidle_sum;
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 2cb3ffc653df..0e7d08514148 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -1186,6 +1186,7 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
P_SCHEDSTAT(nr_failed_migrations_running);
P_SCHEDSTAT(nr_failed_migrations_hot);
P_SCHEDSTAT(nr_forced_migrations);
+ P_SCHEDSTAT(nr_migrations_paravirt);
P_SCHEDSTAT(nr_wakeups);
P_SCHEDSTAT(nr_wakeups_sync);
P_SCHEDSTAT(nr_wakeups_migrate);
@@ -1193,6 +1194,7 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
P_SCHEDSTAT(nr_wakeups_remote);
P_SCHEDSTAT(nr_wakeups_affine);
P_SCHEDSTAT(nr_wakeups_affine_attempts);
+ P_SCHEDSTAT(nr_wakeups_paravirt);
avg_atom = p->se.sum_exec_runtime;
if (nr_switches)
--
2.47.3
More information about the Linuxppc-dev
mailing list