Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1728155ybb; Thu, 9 Apr 2020 07:58:33 -0700 (PDT) X-Google-Smtp-Source: APiQypIgJtZAoeVYZtkTtcDqgTBdGlk4CXGGyZZTJuZSIOFjn/u5jNdtVa38YCZHKBYW5rKGKSbj X-Received: by 2002:a0c:e40f:: with SMTP id o15mr450184qvl.146.1586444313566; Thu, 09 Apr 2020 07:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586444313; cv=none; d=google.com; s=arc-20160816; b=gILtSRtKNF/IVYRQnb7iBbKJRJfuClkhbmF8XoSn0zdVFqjegRYapQx7L6Z72iLLoV xWbwe2mgGPX9YhKjoL78muZF4DDtxGVWsncCj67b6/mDiGCX6X2vUEXz/2SzYHBQypMr UKHvjVuPBeKxJKb0mvhWAXLyT0ouVslXlsPgiDGl/WqSAaB5bkaBCGMt0p00qeaLCXnc Sqo/TliC1nRrejIeg8hDx/8owE1Fv7lTcIOC6Mnmy4eKdmPHdIm6yXc4JSzfEoRhuQr4 hyTogda7RegasxYWFSN8iT4taK03LHHvYOE4c4Bu2woUJ3Ip8z9Am3wSSNq0bS8Dv3LN 2yPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2HSBOlZrCYuVirP8hwOqzTNIGsiZeyNEJ7x+DSCmxnI=; b=SX7HOau/0S6HBvd85TWYtatLK5yqzXxkVPyhRFFswXSe9xz/mk58LArUEMNWIXGOzX SepISIsbnzyss4+YArEzTunx6N/DEOURQgluYX3XI0KGeNN8oUElghBRj/LSwKIgh7FD 2GoYou4++iL6HhgSuAMwFNL90AuR43cmMnyxzoWVVMXg72C4lo2xTQdDIRh4MyAnlAS5 HMCTtAba7ruUIOfzpovnnzazoj0xxvxIw2gCzAG1CgXhAp9NiwKyZc4AY0jQlu2ApEQC CnUYNybBi0PMt9gL6lPzp0qwGePKT9OnUfa/44fx2RlU1lIeXufMUZM6sOVpUBGqOrHc OseQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si1597392qtu.154.2020.04.09.07.58.18; Thu, 09 Apr 2020 07:58:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727919AbgDIOzm (ORCPT + 99 others); Thu, 9 Apr 2020 10:55:42 -0400 Received: from foss.arm.com ([217.140.110.172]:51270 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbgDIOzk (ORCPT ); Thu, 9 Apr 2020 10:55:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 834C830E; Thu, 9 Apr 2020 07:55:40 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 885F93F68F; Thu, 9 Apr 2020 07:55:38 -0700 (PDT) Date: Thu, 9 Apr 2020 15:55:36 +0100 From: Qais Yousef To: luca abeni Cc: Dietmar Eggemann , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Daniel Bristot de Oliveira , Wei Wang , Quentin Perret , Alessio Balsini , Pavan Kondeti , Patrick Bellasi , Morten Rasmussen , Valentin Schneider , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] sched/deadline: Implement fallback mechanism for !fit case Message-ID: <20200409145359.y276yeikn7dp6jmx@e107158-lin.cambridge.arm.com> References: <20200408095012.3819-1-dietmar.eggemann@arm.com> <20200408095012.3819-5-dietmar.eggemann@arm.com> <20200409102557.h4humnsa5dlwvlym@e107158-lin.cambridge.arm.com> <20200409150010.468951df@sweethome> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200409150010.468951df@sweethome> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luca On 04/09/20 15:00, luca abeni wrote: > > Outside of the scope of this series. But does it make sense to make > > sched_setattr() fail to create a new deadline task if the system will > > be overcommitted, hence causing some dl tasks to miss their deadlines? > > The problem is that with multiple processors/cores it is not easy to > know in advance if any task will miss a deadline (see section 3.3 of > Documentation/scheduler/sched-deadline.rst). > > The admission control we are currently using should prevent > SCHED_DEADLINE tasks from overloading the system (starving non-deadline > tasks); proving hard deadline guarantees with global EDF scheduling is > much more difficult (and could be probably done in user-space, I think). I see. I'll dig through the docs, thanks for the reference. > > If some overcommitting is fine (some deadlines are soft and are okay > > to fail every once in a while), does it make sense for this to be a > > tunable of how much the system can be overcommitted before > > disallowing new DL tasks to be created? > > There is already a tunable for the SCHED_DEADLINE admission test > (/proc/sys/kernel/sched_rt_{runtime,period}_us, if I understand well > what you are suggesting). The problem is that it is not easy to find a > value for this tunable that guarantees the hard respect of all > deadlines. I don't think it's similar to what I was referring to. But my knowledge about DL could have failed me to fully appreciate what you're saying. This tunable for RT prevents a single task from using 100% CPU time. I think DL uses it in a similar manner. What I meant by overcommiting, is allowing more DL tasks than the system can guarantee to meet their deadlines. For example, in the context of capacity awareness, if you have 2 big cores, but 4 DL tasks request a bandwidth that can only be satisfied by the big cores, then 2 of them will miss their deadlines (almost) consistently, IIUC. This can be generalized on SMP (I believe). But judging from your earlier response, it's not as straightforward as it seems :) > > But IMHO if someone really wants hard deadline guarantees it is better > to use partitioned scheduling (see Section 5 of the SCHED_DEADLINE > documentation). RT is the same. So this makes sense. Though one would hope to be able to improve on this in the future. Something for me to ponder over :) Thanks -- Qais Yousef