summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2025-01-29 17:59:44 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-22 12:56:45 -0700
commit4ca543f613d6e7974d7d66cecd1f9400ff039342 (patch)
treed110415484d23431c0a2685d42a096abfd14d56d
parentc1c6e527470e5eab0b2d57bd073530fbace39eab (diff)
sched/debug: Provide slice length for fair tasks
[ Upstream commit 9065ce69754dece78606c8bbb3821449272e56bf ] Since commit: 857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion") ... we have the userspace per-task tunable slice length, which is a key parameter that is otherwise difficult to obtain, so provide it in /proc/$PID/sched. [ mingo: Clarified the changelog. ] Signed-off-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/453349b1-1637-42f5-a7b2-2385392b5956@arm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--kernel/sched/debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index a1be00a988bf..5b32d3cc393b 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -1265,6 +1265,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));