[PATCH] sched/debug: Print slice length for fair tasks
From: Christian Loehle
Date: Wed Jan 29 2025 - 12:59:56 EST
With commit 857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime
to set request/slice suggestion") we have the userspace per-task tunable
slice length so print it in /proc/$PID/sched.
Signed-off-by: Christian Loehle <christian.loehle@xxxxxxx>
---
kernel/sched/debug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index fd7e85220715..ef047add7f9e 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -1262,6 +1262,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
if (task_has_dl_policy(p)) {
P(dl.runtime);
P(dl.deadline);
+ } else if (fair_policy(p->policy)) {
+ P(se.slice);
}
#ifdef CONFIG_SCHED_CLASS_EXT
__PS("ext.enabled", task_on_scx(p));
--
2.34.1