All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
Cc: Luca Abeni <luca.abeni@unitn.it>,
	Juri Lelli <juri.lelli@gmail.com>,
	linux-kernel@vger.kernel.org, linux-dl@retis.sssup.it,
	Daniel Bistrot de Oliveira <danielbristot@gmail.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched
Date: Tue, 25 Oct 2016 11:25:19 +0200	[thread overview]
Message-ID: <20161025092519.GV3102@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1477348374-8248-1-git-send-email-tommaso.cucinotta@sssup.it>

On Tue, Oct 25, 2016 at 12:32:53AM +0200, Tommaso Cucinotta wrote:
> Hi all,
> 
> this is a tiny patch providing readings of the current (leftover)
> runtime and absolute deadline in /proc/*/sched. Mostly useful for
> debugging, I heard others playing with SCHED_DEADLINE had some need
> for similar patches as well.
> 
> In addition to debugging, reading the leftover runtime is generally
> useful for adaptive/incremental RT logics that need to check whether
> there's enough runtime left for refining the computed result, or just
> use what we've computed so far and block till the next instance.
> Also, knowing what the absolute scheduling deadline is (along with
> what clock it refers to) might be useful for synchronization purposes.
> (albeit, for real production code, I wouldn't like to parse /proc anyway,
> rather I'd prefer to retrieve those params via eg sched_getscheduler()?)

So for programmatic use, this interface is not recommended. For
debugging this is fine.

Not sure what form the programmatic interface should take, we have
precedence in sys_sched_rr_get_interval() for a syscall (we could even
abuse this one).

Anybody any ideas?

  parent reply	other threads:[~2016-10-25  9:25 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 ` Peter Zijlstra [this message]
2016-10-25  9:33   ` [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched 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:sched/core] sched/deadline: Show " tip-bot for Tommaso Cucinotta

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=20161025092519.GV3102@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=danielbristot@gmail.com \
    --cc=juri.lelli@gmail.com \
    --cc=linux-dl@retis.sssup.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@unitn.it \
    --cc=mingo@kernel.org \
    --cc=tommaso.cucinotta@sssup.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.