linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Tommaso Cucinotta <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: danielbristot@gmail.com, linux-kernel@vger.kernel.org,
	efault@gmx.de, luca.abeni@unitn.it, juri.lelli@arm.com,
	tommaso.cucinotta@sssup.it, tglx@linutronix.de, mingo@kernel.org,
	juri.lelli@gmail.com, torvalds@linux-foundation.org,
	peterz@infradead.org, hpa@zytor.com
Subject: [tip:sched/core] sched/deadline: Show leftover runtime and abs deadline in /proc/*/sched
Date: Sat, 14 Jan 2017 04:47:15 -0800	[thread overview]
Message-ID: <tip-59f8c2989283bbd3df9fcfb22494d84f4852e536@git.kernel.org> (raw)
In-Reply-To: <1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.it>

Commit-ID:  59f8c2989283bbd3df9fcfb22494d84f4852e536
Gitweb:     http://git.kernel.org/tip/59f8c2989283bbd3df9fcfb22494d84f4852e536
Author:     Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
AuthorDate: Wed, 26 Oct 2016 11:17:17 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 14 Jan 2017 11:30:00 +0100

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>
---
 Documentation/scheduler/sched-deadline.txt | 6 ++++++
 kernel/sched/debug.c                       | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt
index 8e37b0b..cbc1b46 100644
--- a/Documentation/scheduler/sched-deadline.txt
+++ b/Documentation/scheduler/sched-deadline.txt
@@ -408,6 +408,11 @@ CONTENTS
   * the new scheduling related syscalls that manipulate it, i.e.,
     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
 ---------------------
@@ -476,6 +481,7 @@ CONTENTS
 
  Still missing:
 
+  - programmatic way to retrieve current runtime and absolute deadline
   - refinements to deadline inheritance, especially regarding the possibility
     of retaining bandwidth isolation among non-interacting tasks. This is
     being studied from both theoretical and practical points of view, and
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index fa178b6..109adc0 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -953,6 +953,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
 #endif
 	P(policy);
 	P(prio);
+	if (p->policy == SCHED_DEADLINE) {
+		P(dl.runtime);
+		P(dl.deadline);
+	}
 #undef PN_SCHEDSTAT
 #undef PN
 #undef __PN

      reply	other threads:[~2017-01-14 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 22:32 [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched Tommaso Cucinotta
2016-10-24 22:32 ` [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/*/sched Tommaso Cucinotta
2016-10-25  9:39   ` Juri Lelli
2016-10-25  9:25 ` [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched Peter Zijlstra
2016-10-25  9:33   ` Juri Lelli
2016-10-25 10:10     ` luca abeni
2016-10-25 11:31       ` Daniel Bristot de Oliveira
2016-10-26  9:17 ` [PATCH] " Tommaso Cucinotta
2016-10-26  9:17   ` [PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/*/sched Tommaso Cucinotta
2017-01-14 12:47     ` tip-bot for Tommaso Cucinotta [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-59f8c2989283bbd3df9fcfb22494d84f4852e536@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=danielbristot@gmail.com \
    --cc=efault@gmx.de \
    --cc=hpa@zytor.com \
    --cc=juri.lelli@arm.com \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luca.abeni@unitn.it \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tommaso.cucinotta@sssup.it \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).