Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@arm.com>
Reviewed-by: Luca Abeni <luca.abeni@unitn.it>
Acked-by: Daniel 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.it
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Tommaso Cucinotta and committed by
Ingo Molnar
59f8c298 5680d809

+10
+6
Documentation/scheduler/sched-deadline.txt
··· 408 408 * the new scheduling related syscalls that manipulate it, i.e., 409 409 sched_setattr() and sched_getattr() are implemented. 410 410 411 + For debugging purposes, the leftover runtime and absolute deadline of a 412 + SCHED_DEADLINE task can be retrieved through /proc/<pid>/sched (entries 413 + dl.runtime and dl.deadline, both values in ns). A programmatic way to 414 + retrieve these values from production code is under discussion. 415 + 411 416 412 417 4.3 Default behavior 413 418 --------------------- ··· 481 476 482 477 Still missing: 483 478 479 + - programmatic way to retrieve current runtime and absolute deadline 484 480 - refinements to deadline inheritance, especially regarding the possibility 485 481 of retaining bandwidth isolation among non-interacting tasks. This is 486 482 being studied from both theoretical and practical points of view, and
+4
kernel/sched/debug.c
··· 953 953 #endif 954 954 P(policy); 955 955 P(prio); 956 + if (p->policy == SCHED_DEADLINE) { 957 + P(dl.runtime); 958 + P(dl.deadline); 959 + } 956 960 #undef PN_SCHEDSTAT 957 961 #undef PN 958 962 #undef __PN