From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbdBOMbv (ORCPT ); Wed, 15 Feb 2017 07:31:51 -0500 Received: from mail.santannapisa.it ([193.205.80.99]:33795 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdBOMbt (ORCPT ); Wed, 15 Feb 2017 07:31:49 -0500 Date: Wed, 15 Feb 2017 13:31:36 +0100 From: Luca Abeni To: Juri Lelli Cc: Steven Rostedt , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Daniel Bristot de Oliveira , Tommaso Cucinotta , Mike Galbraith , Romulo Silva de Oliveira Subject: Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Message-ID: <20170215133136.664c1bfe@luca> In-Reply-To: <20170215102919.GA1368@e106622-lin> References: <20170214142848.4e62a91f@gandalf.local.home> <20170214234926.6b415428@sweethome> <20170214191417.4dd96145@gandalf.local.home> <20170215084003.4d123e5b@luca> <20170215102919.GA1368@e106622-lin> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Juri, On Wed, 15 Feb 2017 10:29:19 +0000 Juri Lelli wrote: [...] > > Ok, thanks; I think I can now see why this can result in a task > > consuming more than the reserved utilisation. I still need some > > time to convince me that "runtime / (deadline - t) > dl_runtime / > > dl_deadline" is the correct check to use (in this case, shouldn't > > we also change the admission test to use densities instead of > > utilisations?) > > Right, this is what I was wondering as well, as dl_overflow() > currently looks at the period. And I also have some recollection of > this discussion happening already in the past, unfortunately it was > not on the list. > > That discussion started with the following patch [...] > that we then dediced not to propose since (note that these are just my > memories of the dicussion, so everything it's up for further > discussion, also in light of the problem highlighted by Daniel) > > - SCHED_DEADLINE, as the documentation says, does AC using > utilization > - it is however true that a sufficient (but not necessary) test on > UP for D_i != P_i cases is the one of my patch above > - we have agreed in the past that the kernel should only check that > we don't cause "overload" in the system (which is still the case if we > consider utilizations), not "hard schedulability" I remember a similar discussion; I think the decision about what to do depends on what are the requirements: hard deadline guarantees (but in this case global EDF is just a bad choice) or tardines no overload guarantees? My understanding was that the kernel guarantees that deadline tasks will not starve non-deadline tasks, and that there is an upper bound for the tardiness experienced by deadline tasks. If this understanding is correct, then the current admission test is ok. But if I misunderstood the purpose of the kernel admission test, then maybe your patch is ok. Then, it is important to keep the admission test consistent with the checks performed in dl_entity_overflow() (but whatever we decide to do, dl_entity_overflow() should be fixed). Luca > - also because on SMP systems "sum(WCET_i / min{D_i, P_i}) <= M" > doesn't guarantee much more than the test base on P_i only (there > not seem to be many/any papers around considering the D_i != P_i case > on SMP actually) > - basically the patch above would only matter for the UP/partitioned > cases > > Thoughts? > > Thanks, > > - Juri