public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luca Abeni <luca.abeni@unitn.it>
To: Henrik Austad <henrik@austad.us>, Juri Lelli <juri.lelli@gmail.com>
Cc: peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com,
	rostedt@goodmis.org, oleg@redhat.com, fweisbec@gmail.com,
	darren@dvhart.com, johan.eker@ericsson.com, p.faure@akatech.ch,
	linux-kernel@vger.kernel.org, claudio@evidence.eu.com,
	michael@amarulasolutions.com, fchecconi@gmail.com,
	tommaso.cucinotta@sssup.it, nicola.manica@disi.unitn.it,
	dhaval.giani@gmail.com, hgu1972@gmail.com,
	paulmck@linux.vnet.ibm.com, raistlin@linux.it,
	insop.song@gmail.com, liming.wang@windriver.com,
	jkacur@redhat.com, harald.gustafsson@ericsson.com,
	vincent.guittot@linaro.org, bruce.ashfield@windriver.com,
	rob@landley.net
Subject: Re: [PATCH] sched/deadline: Add sched_dl documentation
Date: Mon, 20 Jan 2014 14:39:29 +0100	[thread overview]
Message-ID: <52DD2711.9080504@unitn.it> (raw)
In-Reply-To: <20140120131616.GB8907@austad.us>

Hi all,

On 01/20/2014 02:16 PM, Henrik Austad wrote:
[...]
>>>> + The typical -deadline task is composed of a computation phase (instance)
>>>> + which is activated on a periodic or sporadic fashion. The expected (maximum)
>>>> + duration of such computation is called the task's runtime; the time interval
>>>> + by which each instance needs to be completed is called the task's relative
>>>> + deadline. The task's absolute deadline is dynamically calculated as the
>>>> + time instant a task (or, more properly) activates plus the relative
>>>> + deadline.
>>>
>>> activates - released?
>>>
>>
>> I'd keep (modifying a bit):
>>
>> "time instant a task activates plus the relative deadline."
>>
>> This is probably the nearest thing to what is implemented that we can say
>> (without entering into the theory too much), a task that "activates" can mean
>> that it is first released, enqueued, woken-up, etc.
>
> So, if we look at release (yes, I'm avoiding activates for a little while)
> as the time at the *beginning* of a new period, then, and only then should
> the *absolute* deadline be computed.
>
> If you den move on to use 'activate' as a term for when a task becomes
> eligble to run, then 'release' becomes a subset of 'activate', and you
> should only compute the absolute deadline at that time. Did that make
> sense?
I think things are a little bit complex here, because there are 2 different
"deadlines" we can think about:
- the "jobs deadlines" (the absolute job deadline can be computed at job
   arrival, as the arrival time + the relative deadline). These are generally
   used for performance metrics, to see if a job is respecting its timing
   constraints or not
- the "scheduling deadlines", which are the ones used by the scheduler to
   schedule the tasks. These are computed at tasks' wake-up time - notice that
   for self-suspending jobs there can be wake-up times that are not job arrival
   times. And are assigned according to the rules described in the CBS paper.
I think this can easily become very confusing, so I currently have no concrete
proposals for improving the documentation... But I wanted to point out that
things here are more complex than in the "traditional" real-time task model.

Maybe a solution could be to simply describe scheduling deadlines (which are
what sched_deadline uses) without going into the details of jobs' deadlines.
So, the document could avoid talking about instances (or jobs), and can say
that a task is guaranteed to receive "runtime" time units every "period" time
units (and these "runtime" time units are available within "deadline" time
units from the beginning of the period). Every time the task wakes up, the
scheduler computes a scheduling deadline consistent with this constraint,
and tasks are scheduled using EDF on these scheduling deadlines.
Every time "runtime" time units are consumed in a period, the scheduling
deadline is postponed by a period.

This is of course an approximative description, but I think it can give an
intuitive idea of how the scheduler works, and about the meaning of the three
scheduling parameters.



				Luca

  reply	other threads:[~2014-01-20 13:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20 10:40 [PATCH] sched/deadline: Add sched_dl documentation Juri Lelli
2014-01-20 11:24 ` Henrik Austad
2014-01-20 11:46   ` Peter Zijlstra
2014-01-21 14:55     ` Steven Rostedt
2014-01-20 12:15   ` Juri Lelli
2014-01-20 13:16     ` Henrik Austad
2014-01-20 13:39       ` Luca Abeni [this message]
2014-01-21 10:20         ` Henrik Austad
2014-01-21 11:35           ` Luca Abeni
2014-01-21 12:11             ` Juri Lelli
2014-01-21 12:33             ` Peter Zijlstra
2014-01-21 12:50               ` Luca Abeni
2014-01-21 13:55                 ` Peter Zijlstra
2014-01-21 14:38                   ` Juri Lelli
2014-01-21 16:28                   ` Steven Rostedt
2014-01-22 13:03                   ` Luca Abeni
2014-01-22 13:51                     ` Peter Zijlstra
2014-01-24 10:08                       ` Tommaso Cucinotta
2014-01-28  9:31                         ` Peter Zijlstra
2014-01-28 18:22                           ` Tommaso Cucinotta
2014-01-21 10:21   ` Henrik Austad
2014-01-20 12:25 ` Luca Abeni
  -- strict thread matches above, loose matches on Subject: below --
2014-01-27 11:20 Juri Lelli
2014-01-27 11:23 ` Juri Lelli
2014-01-27 11:53 ` Henrik Austad
2014-01-27 12:30   ` Luca Abeni
2014-01-27 12:40     ` Henrik Austad
2014-01-27 12:52       ` Luca Abeni
2014-01-27 15:35 ` Steven Rostedt
2014-01-27 16:56   ` Luca Abeni
2014-01-27 17:09     ` Steven Rostedt
2014-01-27 22:29       ` Luca Abeni
2014-01-28 10:03         ` Juri Lelli

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=52DD2711.9080504@unitn.it \
    --to=luca.abeni@unitn.it \
    --cc=bruce.ashfield@windriver.com \
    --cc=claudio@evidence.eu.com \
    --cc=darren@dvhart.com \
    --cc=dhaval.giani@gmail.com \
    --cc=fchecconi@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=harald.gustafsson@ericsson.com \
    --cc=henrik@austad.us \
    --cc=hgu1972@gmail.com \
    --cc=insop.song@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=johan.eker@ericsson.com \
    --cc=juri.lelli@gmail.com \
    --cc=liming.wang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@amarulasolutions.com \
    --cc=mingo@redhat.com \
    --cc=nicola.manica@disi.unitn.it \
    --cc=oleg@redhat.com \
    --cc=p.faure@akatech.ch \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=raistlin@linux.it \
    --cc=rob@landley.net \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tommaso.cucinotta@sssup.it \
    --cc=vincent.guittot@linaro.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