Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbZL2Oht (ORCPT ); Tue, 29 Dec 2009 09:37:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752039AbZL2Oht (ORCPT ); Tue, 29 Dec 2009 09:37:49 -0500 Received: from casper.infradead.org ([85.118.1.10]:35423 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbZL2Ohs (ORCPT ); Tue, 29 Dec 2009 09:37:48 -0500 Subject: Re: [RFC 0/12][PATCH] SCHED_DEADLINE: core of the scheduling class From: Peter Zijlstra To: Raistlin Cc: linux-kernel , michael trimarchi , Fabio Checconi , Ingo Molnar , Thomas Gleixner , Dhaval Giani , Johan Eker , "p.faure" , Chris Friesen , Steven Rostedt , Henrik Austad , Frederic Weisbecker , Darren Hart , Sven-Thorsten Dietrich , Bjoern Brandenburg , Tommaso Cucinotta , "giuseppe.lipari" , Juri Lelli In-Reply-To: <1262097042.7135.150.camel@laptop> References: <1255707324.6228.448.camel@Palantir> <1255707614.6228.453.camel@Palantir> <1262097042.7135.150.camel@laptop> Content-Type: text/plain; charset="UTF-8" Date: Tue, 29 Dec 2009 15:37:02 +0100 Message-ID: <1262097422.7135.152.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1528 Lines: 40 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). Hmm I suppose we could ignore all that CONFIG_SCHED_HRTICK stuff and simply bounce the schedule event using the resched ipi when we find we're on the wrong cpu. Not ideal though.. frigging mess all this :-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/