From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbdANMr7 (ORCPT ); Sat, 14 Jan 2017 07:47:59 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52044 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbdANMr5 (ORCPT ); Sat, 14 Jan 2017 07:47:57 -0500 Date: Sat, 14 Jan 2017 04:47:15 -0800 From: tip-bot for Tommaso Cucinotta Message-ID: 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 Reply-To: torvalds@linux-foundation.org, juri.lelli@gmail.com, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, juri.lelli@arm.com, tglx@linutronix.de, tommaso.cucinotta@sssup.it, danielbristot@gmail.com, linux-kernel@vger.kernel.org, efault@gmx.de, luca.abeni@unitn.it In-Reply-To: <1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.it> References: <1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.it> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/deadline: Show leftover runtime and abs deadline in /proc/*/sched Git-Commit-ID: 59f8c2989283bbd3df9fcfb22494d84f4852e536 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 59f8c2989283bbd3df9fcfb22494d84f4852e536 Gitweb: http://git.kernel.org/tip/59f8c2989283bbd3df9fcfb22494d84f4852e536 Author: Tommaso Cucinotta AuthorDate: Wed, 26 Oct 2016 11:17:17 +0200 Committer: Ingo Molnar 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juri Lelli Reviewed-by: Luca Abeni Acked-by: Daniel Bistrot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1477473437-10346-2-git-send-email-tommaso.cucinotta@sssup.it Signed-off-by: Ingo Molnar --- 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//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