From: Peter Zijlstra <peterz@infradead.org>
To: Dario Faggioli <faggioli@gandalf.sssup.it>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
michael trimarchi <michael@evidence.eu.com>,
Fabio Checconi <fabio@gandalf.sssup.it>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Dhaval Giani <dhaval.giani@gmail.com>,
Johan Eker <johan.eker@ericsson.com>,
"p.faure" <p.faure@akatech.ch>,
Chris Friesen <cfriesen@nortel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Henrik Austad <henrik@austad.us>,
Frederic Weisbecker <fweisbec@gmail.com>,
Darren Hart <darren@dvhart.com>,
Sven-Thorsten Dietrich <sven@thebigcorporation.com>,
Claudio Scordino <claudio@evidence.eu.com>,
Tommaso Cucinotta <tommaso.cucinotta@sssup.it>,
"giuseppe.lipari" <giuseppe.lipari@sssup.it>,
Juri Lelli <juri.lelli@gmail.com>
Subject: Re: [RFC 0/12][PATCH] SCHED_DEADLINE: core of the scheduling class
Date: Wed, 13 Jan 2010 17:47:01 +0100 [thread overview]
Message-ID: <1263401221.4244.250.camel@laptop> (raw)
In-Reply-To: <1263400341.3853.287.camel@Palantir>
On Wed, 2010-01-13 at 17:32 +0100, Dario Faggioli wrote:
> On Tue, 2009-12-29 at 15:30 +0100, Peter Zijlstra wrote:
> > On Fri, 2009-10-16 at 17:40 +0200, Raistlin wrote:
> > > +struct task_struct *pick_next_task_deadline(struct rq *rq)
> > > +{
> > > + struct sched_dl_entity *dl_se;
> > > + struct task_struct *p;
> > > + struct dl_rq *dl_rq;
> > > +
> > > + dl_rq = &rq->dl;
> > > +
> > > + if (likely(!dl_rq->dl_nr_running))
> > > + return NULL;
> > > +
> > > + dl_se = pick_next_deadline_entity(rq, dl_rq);
> > > + BUG_ON(!dl_se);
> > > +
> > > + p = deadline_task_of(dl_se);
> > > + p->se.exec_start = rq->clock;
> > > +#ifdef CONFIG_SCHED_HRTICK
> > > + if (hrtick_enabled(rq))
> > > + start_hrtick_deadline(rq, p);
> > > +#endif
> > > + return p;
> > > +}
> >
> > I'm not sure about actually using hrtick like this, I'd expect
> > SCHED_DEADLINE to always use hrtimers when available. The only reason
> > to use some of the hrtick infrastructure is to re-use the hrtick_start()
> > logic which uses IPIs to ensure we program the timer on the right cpu
> > (so we can schedule from it).
> >
> Yeah, that and the fact that it seemed to me very easy and clean to:
> - check for runtime enforcement inside the task_tick_deadline function,
> as other scheduling classes do, and then
> - if possible, ask that task_tick_deadline function to be called right
> at the time instant I expect my runtime to be depleted. If that won't
> happen --because of no-hrtick or no-hires-hrtimers-- the check will
> still be performed during the next tick.
>
> > The whole IPI mess requires USE_GENERIC_SMP_HELPERS, which makes
> > CONFIG_HRTICK useful (ensures we have hrtimers enabled and have generic
> > IPI bits)
> >
> > The problem is that things like hrtick_enabled() also check
> > sched_feat(HRTICK) which is disabled by default (because programming the
> > clock hw on each schedule was found too expensive) but that should not
> > stop SCHED_DEADLINE from using it.
> >
> Mmm... I might have lost you here... :-(
I had a little chat with fabio around new-years and I think we ended up
agreeing that your current usage is ok, we can always fix it up later.
Its an unfortunate complicated dance of hrtimer being configured in,
having capable hardware and dealing with all the fallout cases.
The only thing which is unfortunate for your current usage is the
sched_feat(HRTICK) thing, we generally do not want HRTICK for
SCHED_OTHER, whereas we'd always (when configured and having capable
hardware) want if for SCHED_DEADLINE..
next prev parent reply other threads:[~2010-01-13 16:47 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 15:35 [RFC 0/12][PATCH] SCHED_DEADLINE (new version of SCHED_EDF) Raistlin
2009-10-16 15:38 ` [RFC 1/12][PATCH] Extended scheduling parameters structure added Raistlin
2009-12-29 12:15 ` Peter Zijlstra
2010-01-13 10:36 ` Raistlin
2009-10-16 15:40 ` [RFC 0/12][PATCH] SCHED_DEADLINE: core of the scheduling class Raistlin
2009-12-29 12:25 ` Peter Zijlstra
2010-01-13 10:40 ` Dario Faggioli
2009-12-29 12:27 ` Peter Zijlstra
2010-01-13 10:42 ` Raistlin
2009-12-29 14:30 ` Peter Zijlstra
2009-12-29 14:37 ` Peter Zijlstra
2009-12-29 14:40 ` Peter Zijlstra
2010-01-13 16:32 ` Dario Faggioli
2010-01-13 16:47 ` Peter Zijlstra [this message]
2009-12-29 14:41 ` Peter Zijlstra
2010-01-13 10:46 ` Raistlin
2009-10-16 15:41 ` [RFC 0/12][PATCH] SCHED_DEADLINE: fork and terminate task logic Raistlin
2009-12-29 15:20 ` Peter Zijlstra
2010-01-13 11:11 ` Raistlin
2010-01-13 16:15 ` Peter Zijlstra
2010-01-13 16:28 ` Dario Faggioli
2010-01-13 21:30 ` Fabio Checconi
2009-10-16 15:41 ` [RFC 0/12][PATCH] SCHED_DEADLINE: added sched_*_ex syscalls Raistlin
2009-10-16 15:42 ` [RFC 0/12][PATCH] SCHED_DEADLINE: added sched-debug support Raistlin
2009-10-16 15:43 ` [RFC 6/12][PATCH] SCHED_DEADLINE: added scheduling latency tracer Raistlin
2009-10-16 15:44 ` [RFC 7/12][PATCH] SCHED_DEADLINE: signal delivery when overrunning Raistlin
2009-12-28 14:19 ` Peter Zijlstra
2010-01-13 9:30 ` Raistlin
2009-10-16 15:44 ` [RFC 8/12][PATCH] SCHED_DEADLINE: wait next instance syscall added Raistlin
2009-12-28 14:30 ` Peter Zijlstra
2010-01-13 9:33 ` Raistlin
2009-10-16 15:45 ` [RFC 9/12][PATCH] SCHED_DEADLINE: system wide bandwidth management Raistlin
2009-11-06 11:34 ` Dhaval Giani
2009-12-28 14:44 ` Peter Zijlstra
2010-01-13 9:41 ` Raistlin
2009-10-16 15:46 ` [RFC 10/12][PATCH] SCHED_DEADLINE: group bandwidth management code Raistlin
2009-12-28 14:51 ` Peter Zijlstra
2010-01-13 9:46 ` Raistlin
2009-10-16 15:47 ` [RFC 11/12][PATCH] SCHED_DEADLINE: documentation Raistlin
2009-10-16 15:48 ` [RFC 12/12][PATCH] SCHED_DEADLINE: modified sched_*_ex API Raistlin
2009-12-28 15:09 ` Peter Zijlstra
2010-01-13 10:27 ` Raistlin
2010-01-13 16:23 ` Peter Zijlstra
2009-12-29 12:15 ` Peter Zijlstra
2010-01-13 10:33 ` Raistlin
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=1263401221.4244.250.camel@laptop \
--to=peterz@infradead.org \
--cc=cfriesen@nortel.com \
--cc=claudio@evidence.eu.com \
--cc=darren@dvhart.com \
--cc=dhaval.giani@gmail.com \
--cc=fabio@gandalf.sssup.it \
--cc=faggioli@gandalf.sssup.it \
--cc=fweisbec@gmail.com \
--cc=giuseppe.lipari@sssup.it \
--cc=henrik@austad.us \
--cc=johan.eker@ericsson.com \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@evidence.eu.com \
--cc=mingo@elte.hu \
--cc=p.faure@akatech.ch \
--cc=rostedt@goodmis.org \
--cc=sven@thebigcorporation.com \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox