Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508159

Re: [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched

From luca abeni <luca.abeni@unitn.it>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched
Date 2016-10-25 12:20 +0200
Message-ID <sw6ZP-4he-3@gated-at.bofh.it> (permalink)
References <svX0t-5XK-5@gated-at.bofh.it> <sw6dr-3Ia-5@gated-at.bofh.it> <sw6n8-3Lf-19@gated-at.bofh.it>
Organization university of trento

Show all headers | View raw


On Tue, 25 Oct 2016 10:33:21 +0100
Juri Lelli <juri.lelli@arm.com> wrote:

> On 25/10/16 11:25, Peter Zijlstra wrote:
> > 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?
> >   
> 
> Maybe extend getattr() to return actual runtime params? (instead of
> the static ones, or along to them)

This is similar to what I did in the past: I used (or maybe abused?)
the "flags" argument of getattr() to tell it if I wanted it to return
the current runtime and scheduling deadline, or the maximum runtime and
relative deadline.

I think that both the "/proc based" interface proposed by Tommaso and
the syscall-based one are useful (for different purposes).


				Luca

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched Tommaso Cucinotta <tommaso.cucinotta@sssup.it> - 2016-10-25 01:40 +0200
  Re: [RFC PATCH] sched/deadline: show leftover runtime and abs  deadline in /proc/-/sched Peter Zijlstra <peterz@infradead.org> - 2016-10-25 11:30 +0200
    Re: [RFC PATCH] sched/deadline: show leftover runtime and abs  deadline in /proc/-/sched Juri Lelli <juri.lelli@arm.com> - 2016-10-25 11:40 +0200
      Re: [RFC PATCH] sched/deadline: show leftover runtime and abs  deadline in /proc/-/sched luca abeni <luca.abeni@unitn.it> - 2016-10-25 12:20 +0200
        Re: [RFC PATCH] sched/deadline: show leftover runtime and abs  deadline in /proc/-/sched Daniel Bristot de Oliveira <bristot@redhat.com> - 2016-10-25 13:40 +0200
  [PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/*/sched Tommaso Cucinotta <tommaso.cucinotta@sssup.it> - 2016-10-26 11:20 +0200
  [PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched Tommaso Cucinotta <tommaso.cucinotta@sssup.it> - 2016-10-26 11:20 +0200

csiph-web