Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756732Ab0KKWNR (ORCPT ); Thu, 11 Nov 2010 17:13:17 -0500 Received: from canuck.infradead.org ([134.117.69.58]:60867 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944Ab0KKWNQ convert rfc822-to-8bit (ORCPT ); Thu, 11 Nov 2010 17:13:16 -0500 Subject: Re: [RFC][PATCH 18/22] sched: add reclaiming logic to -deadline tasks From: Peter Zijlstra To: Raistlin Cc: Ingo Molnar , Thomas Gleixner , Steven Rostedt , Chris Friesen , oleg@redhat.com, Frederic Weisbecker , Darren Hart , Johan Eker , "p.faure" , linux-kernel , Claudio Scordino , michael trimarchi , Fabio Checconi , Tommaso Cucinotta , Juri Lelli , Nicola Manica , Luca Abeni , Dhaval Giani , Harald Gustafsson , paulmck In-Reply-To: <1288334546.8661.161.camel@Palantir> References: <1288333128.8661.137.camel@Palantir> <1288334546.8661.161.camel@Palantir> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 11 Nov 2010 23:12:53 +0100 Message-ID: <1289513573.2084.199.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2029 Lines: 43 On Fri, 2010-10-29 at 08:42 +0200, Raistlin wrote: > The bandwidth enforcing mechanism implemented inside the > SCHED_DEADLINE policy ensures that overrunning tasks are slowed > down without interfering with well behaving ones. > This, however, comes at the price of limiting the capability of > a task to exploit more bandwidth than it is asigned. > > The current implementation always stops a task that is trying > to use more than its runtime (every deadline). Something else that > could be done is to let it continue running, but with a "decreased > priority". This way, we can exploit full CPU bandwidth and still > avoid interferences. > > In order of "decreasing the priority" of a deadline task, we can: > - let it stay SCHED_DEADLINE and postpone its deadline. This way it > will always be scheduled before -rt and -other tasks but it > won't affect other -deadline tasks; > - put it in SCHED_FIFO with some priority. This way it will always > be scheduled before -other tasks but it won't affect -deadline > tasks, nor other -rt tasks with higher priority; > - put it in SCHED_OTHER. > > Notice also that this can be done on a per-task basis, e.g., each > task can specify what kind of reclaiming mechanism it wants to use > by means of the sched_flags field of sched_param_ex. > > Therefore, this patch: > - adds the flags for specyfing DEADLINE, RT or OTHER reclaiming > behaviour; > - adds the logic that changes the scheduling class of a task when > it overruns, according to the requested policy. The first two definitely should require SYS_CAP_ADMIN because it allows silly while(1) loops again.. but can we postpone this fancy feature as well? I'd much rather have the stochastic thing implemented that allows limited temporal overrun. -- 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/