From: Peter Zijlstra <peterz@infradead.org>
To: Harald Gustafsson <harald.gustafsson@ericsson.com>
Cc: Dario Faggioli <faggioli@gandalf.sssup.it>,
Harald Gustafsson <hgu1972@gmail.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Claudio Scordino <claudio@evidence.eu.com>,
Michael Trimarchi <trimarchi@retis.sssup.it>,
Fabio Checconi <fabio@gandalf.sssup.it>,
Tommaso Cucinotta <cucinotta@sssup.it>,
Juri Lelli <juri.lelli@gmail.com>,
Dario Faggioli <raistlin@linux.it>
Subject: Re: [PATCH 1/3] Added runqueue clock normalized with cpufreq
Date: Fri, 17 Dec 2010 15:29:54 +0100 [thread overview]
Message-ID: <1292596194.2266.283.camel@twins> (raw)
In-Reply-To: <7997200675c1a53b1954fdc3f46dd208db5dea77.1292578808.git.harald.gustafsson@ericsson.com>
On Fri, 2010-12-17 at 14:02 +0100, Harald Gustafsson wrote:
> This is a request for comments on additions to sched deadline v3 patches.
> Deadline scheduler is the first scheduler (I think) we introduce in Linux that
> specifies the runtime in time and not only as a weight or a relation.
> I have introduced a normalized runtime clock dependent on the CPU frequency.
> This is used, in [PATCH 2/3], to calculate the deadline thread's runtime
> so that approximately the same number of cycles are giving to the thread
> independent of the CPU frequency.
>
> I suggest that this is important for users of hard reservation based schedulers
> that the intended amount of work can be accomplished independent of the CPU frequency.
> The usage of CPU frequency scaling is important on mobile devices and hence
> the combination of deadline scheduler and cpufreq should be solved.
> So before I do this for the linux tip I would welcome a discussion about if this
> is a good idea and also suggestions on how to improve this.
I'm thinking this is going about it totally wrong..
Solving the CPUfreq problem involves writing a SCHED_DEADLINE aware
CPUfreq governor. The governor must know about the constraints placed on
the system by the task-set. You simply cannot lower the frequency when
your system is at u=1.
Once you have a governor that keeps the freq such that: freq/max_freq >=
utilization (which is only sufficient for deadline == period systems),
then you need to frob the SCHED_DEADLINE runtime accounting.
Adding a complete normalized clock to the system like you've done is a
total no-go, it adds overhead even for the !SCHED_DEADLINE case.
The simple solution would be to slow down the runtime accounting of
SCHED_DEADLINE tasks by freq/max_freq. So instead of having:
dl_se->runtime -= delta;
you do something like:
dl_se->runtime -= (freq * delta) / max_freq;
Which auto-magically grows the actual bandwidth, and since the deadlines
are wall-time already it all works out nicely. It also keeps the
overhead inside SCHED_DEADLINE.
next prev parent reply other threads:[~2010-12-17 14:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 13:02 [PATCH 1/3] Added runqueue clock normalized with cpufreq Harald Gustafsson
2010-12-17 13:02 ` [PATCH 2/3] cpufreq normalized runtime to enforce runtime cycles also at lower frequencies Harald Gustafsson
2010-12-17 13:02 ` [PATCH 3/3] sched trace updated with normalized clock info Harald Gustafsson
2010-12-17 14:29 ` Peter Zijlstra [this message]
2010-12-17 14:32 ` [PATCH 1/3] Added runqueue clock normalized with cpufreq Peter Zijlstra
2010-12-17 15:06 ` Harald Gustafsson
2010-12-17 15:16 ` Peter Zijlstra
2010-12-17 15:36 ` Harald Gustafsson
2010-12-17 15:43 ` Thomas Gleixner
2010-12-17 15:54 ` Harald Gustafsson
2010-12-17 18:44 ` Dario Faggioli
2011-01-03 14:17 ` Pavel Machek
2010-12-17 15:02 ` Harald Gustafsson
2010-12-17 18:48 ` Dario Faggioli
2010-12-17 18:56 ` Dario Faggioli
2010-12-17 18:59 ` Peter Zijlstra
2010-12-17 19:16 ` Dario Faggioli
2010-12-17 19:31 ` Harald Gustafsson
2010-12-20 0:11 ` Tommaso Cucinotta
2010-12-20 9:44 ` Harald Gustafsson
2011-01-03 20:25 ` Tommaso Cucinotta
2011-01-04 12:16 ` Harald Gustafsson
2010-12-17 19:27 ` Harald Gustafsson
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=1292596194.2266.283.camel@twins \
--to=peterz@infradead.org \
--cc=claudio@evidence.eu.com \
--cc=cucinotta@sssup.it \
--cc=fabio@gandalf.sssup.it \
--cc=faggioli@gandalf.sssup.it \
--cc=harald.gustafsson@ericsson.com \
--cc=hgu1972@gmail.com \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=raistlin@linux.it \
--cc=tglx@linutronix.de \
--cc=trimarchi@retis.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.