Commit 59f8c298 authored by Tommaso Cucinotta's avatar Tommaso Cucinotta Committed by Ingo Molnar

sched/deadline: Show leftover runtime and abs deadline in /proc/*/sched

This patch allows for reading the current (leftover) runtime and
absolute deadline of a SCHED_DEADLINE task through /proc/*/sched
(entries dl.runtime and dl.deadline), while debugging/testing.
Signed-off-by: default avatarTommaso Cucinotta <tommaso.cucinotta@sssup.it>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarJuri Lelli <juri.lelli@arm.com>
Reviewed-by: default avatarLuca Abeni <luca.abeni@unitn.it>
Acked-by: default avatarDaniel Bistrot de Oliveira <danielbristot@gmail.com>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.itSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 5680d809
...@@ -408,6 +408,11 @@ CONTENTS ...@@ -408,6 +408,11 @@ CONTENTS
* the new scheduling related syscalls that manipulate it, i.e., * the new scheduling related syscalls that manipulate it, i.e.,
sched_setattr() and sched_getattr() are implemented. sched_setattr() and sched_getattr() are implemented.
For debugging purposes, the leftover runtime and absolute deadline of a
SCHED_DEADLINE task can be retrieved through /proc/<pid>/sched (entries
dl.runtime and dl.deadline, both values in ns). A programmatic way to
retrieve these values from production code is under discussion.
4.3 Default behavior 4.3 Default behavior
--------------------- ---------------------
...@@ -476,6 +481,7 @@ CONTENTS ...@@ -476,6 +481,7 @@ CONTENTS
Still missing: Still missing:
- programmatic way to retrieve current runtime and absolute deadline
- refinements to deadline inheritance, especially regarding the possibility - refinements to deadline inheritance, especially regarding the possibility
of retaining bandwidth isolation among non-interacting tasks. This is of retaining bandwidth isolation among non-interacting tasks. This is
being studied from both theoretical and practical points of view, and being studied from both theoretical and practical points of view, and
......
...@@ -953,6 +953,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) ...@@ -953,6 +953,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
#endif #endif
P(policy); P(policy);
P(prio); P(prio);
if (p->policy == SCHED_DEADLINE) {
P(dl.runtime);
P(dl.deadline);
}
#undef PN_SCHEDSTAT #undef PN_SCHEDSTAT
#undef PN #undef PN
#undef __PN #undef __PN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment