From: Henrik Austad <henrik@austad.us>
To: Luca Abeni <luca.abeni@unitn.it>
Cc: Juri Lelli <juri.lelli@gmail.com>,
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,
linux-doc@vger.kernel.org, rob@landley.net
Subject: Re: [PATCH] sched/deadline: Add sched_dl documentation
Date: Mon, 27 Jan 2014 13:40:11 +0100 [thread overview]
Message-ID: <20140127124011.GA16809@austad.us> (raw)
In-Reply-To: <52E65172.6070809@unitn.it>
[-- Attachment #1: Type: text/plain, Size: 4369 bytes --]
On Mon, Jan 27, 2014 at 01:30:42PM +0100, Luca Abeni wrote:
> Hi Henrik,
>
> On 01/27/2014 12:53 PM, Henrik Austad wrote:
> [...]
> >>+ In more details, the CBS algorithm assigns scheduling deadlines to
> >>+ tasks in the following way:
> >>+
> >>+ - Each SCHED_DEADLINE task is characterised by the "runtime",
> >>+ "deadline", and "period" parameters;
> >>+
> >>+ - The state of the task is described by a "scheduling deadline", and
> >>+ a "current runtime". These two parameters are initially set to 0;
> >>+
> >>+ - When a SCHED_DEADLINE task wakes up (becomes ready for execution),
> >>+ the scheduler checks if
> >>+
> >>+ current runtime runtime
> >>+ ---------------------------------- > ----------------
> >>+ scheduling deadline - current time period
> >>+
> >>+ then, if the scheduling deadline is smaller than the current time, or
> >>+ this condition is verified, the scheduling deadline and the
> >>+ current budget are re-initialised as
> >
> >Current runtime: time spent running _this_ period? or is _remaining_
> >runtime this period? I get the feeling it's the latter.
> >
> >So, roughly, it is the ration
> >
> > remaining_runtime / relative_time_to_deadline
> >
> >which needs to be greater than the assigned CPU bandwidth, and if so, the
> >budget should be replensihed?
> >
> >Shouldn't there be something about not refilling the budget before a new
> >period has started?
> Uh... Maybe the description above can be improved :)
> Do you think that using "remaining runtime" instead of "current runtime"
> would help? If yes, I'll make this change.
Yes, in my vocabularly, "remaining" != "current" :), so changing to
'remaining runtime' would be nice.
> Also, I see that some of your questions are answered by some items below...
Yes, but I left the comments to indicate that the order was a bit
confusing.
> Do you think that changing the order of the items in the presentation would
> improve the readability? If you suggest a better ordering, I'll try to
> rewrite the algorithm's description according to it.
Could be, at least the ratio-caclulation was a bit confusing until I'd read
the entire section.
My preferred order (I've just cut'n'pased from the original email here)
+ - The state of the task is described by a "scheduling deadline", and
+ a "current runtime". These two parameters are initially set to 0;
+
+ - Each SCHED_DEADLINE task is characterised by the "runtime",
+ "deadline", and "period" parameters;
+
+ - When a SCHED_DEADLINE task executes for an amount of time t, its
+ current runtime is decreased as
+
+ current runtime = current runtime - t
+
+ (technically, the runtime is decreased at every tick, or when the
+ task is descheduled / preempted);
+
+ - When the current runtime becomes less or equal than 0, the task is
+ said to be "throttled" (also known as "depleted" in real-time literature)
+ and cannot be scheduled until its scheduling deadline. The "replenishment
+ time" for this task (see next item) is set to be equal to the current
+ value of the scheduling deadline;
+
+ - When the current time is equal to the replenishment time of a
+ throttled task, the scheduling deadline and the current runtime are
+ updated as
+
+ scheduling deadline = scheduling deadline + period
+ current runtime = current runtime + runtime
+ - When a SCHED_DEADLINE task wakes up (becomes ready for execution),
+ the scheduler checks if
+
+ current runtime runtime
+ ---------------------------------- > ----------------
+ scheduling deadline - current time period
+
+ then, if the scheduling deadline is smaller than the current time, or
+ this condition is verified, the scheduling deadline and the
+ current budget are re-initialised as
+
+ scheduling deadline = current time + deadline
+ current runtime = runtime
+
+ otherwise, the scheduling deadline and the current runtime are
+ left unchanged;
+
Emphasis on -my- preferred order. :)
Either way, I'm quite happy with this documentation-update, this is just
nitpick :)
--
Henrik Austad
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-01-27 12:42 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 11:20 [PATCH] sched/deadline: Add sched_dl documentation 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 [this message]
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
2014-01-28 19:22 ` [tip:sched/numa] " tip-bot for Dario Faggioli
-- strict thread matches above, loose matches on Subject: below --
2014-01-20 10:40 [PATCH] " 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
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
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=20140127124011.GA16809@austad.us \
--to=henrik@austad.us \
--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=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-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.abeni@unitn.it \
--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 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.