Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5001839yba; Wed, 8 May 2019 06:28:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhZYUxye9O0EMPANGBBkwFmiOA0hzeWhUYM7Y9kiSQlG5tknBLykgB5oHC0zJgTDY0dqZk X-Received: by 2002:a62:a219:: with SMTP id m25mr48841448pff.197.1557322107063; Wed, 08 May 2019 06:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557322107; cv=none; d=google.com; s=arc-20160816; b=sa2ryfj6C3KfgC5+GRT2lfxmHDU93cwuyA/804Q3dFy9CZOZ+1sBShIY2kARtXH3+A 081XCGFtTbdkVTFzu4zNeXblV8FXp7dvfBsqAIfMyUb/WI50kPZesJreTAbYsmGseRHE RBgwSuLVheqgw4zc1ij4njgFPREwH0lOCtwetHkXp2OlQ/7/sPBywTyfsQc1XGh/Y7wx c/vj6NPAMOgWEDl5odoY7SMy5SX1qWWiRZ6ss0QRzBmEZLDfPHOAwtf+OQAtd26vVYhW ZuQoYyvhfZVHUp9sxMmCjkab+EkqaRRGSyG8fBW4eZyvVhAHk0gtSTFwQJEnHBiwhBTC g+Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=STPjE7iZJkuhuMbwhR0H2gvunPp3kxyH3Xz+Ypk5Coo=; b=tHNsiutoS4+HGY/Czh9jICd7NwUGIbLiT387Vy1DMRnJVJIDvaqAi5VV55zGAiDBuJ YqecHsC5rJY+Cr+5jcSJpvik1NEv6i7YBu/xXElaqIUxPJsHelJwgkZyWhQZ5K45LA+J fwrUcPz9xNkMFYdOA1aIVj8ibS4r7GmVQU2l4DGFOoRfbGbWpnOi3wlTHOsOIv3kQc4Z TZ661qrBMHJ0I+BJYjzs4eR2cI3T+CVq5pNDEaRVvi5dA0zJzSPDKR2Gep1fA3OvRG1e 8FDxXzy1/G4zHNi4dFqKhp1BcH52hI59RNLrL7t3TIcLOMLJSP1vi84Qc39a4V3gKpCh c+bw== 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 e11si24297854plb.249.2019.05.08.06.28.11; Wed, 08 May 2019 06:28:27 -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 S1728647AbfEHMre (ORCPT + 99 others); Wed, 8 May 2019 08:47:34 -0400 Received: from ms01.santannapisa.it ([193.205.80.98]:53417 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbfEHMre (ORCPT ); Wed, 8 May 2019 08:47:34 -0400 Received: from [83.43.182.198] (account l.abeni@santannapisa.it HELO nowhere) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 138929448; Wed, 08 May 2019 14:47:23 +0200 Date: Wed, 8 May 2019 14:47:16 +0200 From: luca abeni To: Juri Lelli Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" , Ingo Molnar , Peter Zijlstra , Vincent Guittot , "Paul E . McKenney" , Joel Fernandes , Quentin Perret , Luc Van Oostenryck , Morten Rasmussen , Daniel Bristot de Oliveira , Patrick Bellasi , Tommaso Cucinotta Subject: Re: [RFC PATCH 4/6] sched/dl: Improve capacity-aware wakeup Message-ID: <20190508144716.5cc8445d@nowhere> In-Reply-To: <20190508120526.GI6551@localhost.localdomain> References: <20190506044836.2914-1-luca.abeni@santannapisa.it> <20190506044836.2914-5-luca.abeni@santannapisa.it> <20190508090855.GG6551@localhost.localdomain> <20190508112437.74661fa8@nowhere> <20190508120526.GI6551@localhost.localdomain> Organization: Scuola Superiore S.Anna X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Juri, On Wed, 8 May 2019 14:05:26 +0200 Juri Lelli wrote: [...] > > > > + if ((rel_deadline < 0) || (rel_deadline * > > > > dl_se->dl_runtime < dl_se->dl_deadline * rem_runtime)) { > > > > + rel_deadline = dl_se->dl_deadline; > > > > + rem_runtime = dl_se->dl_runtime; > > > > + } > > > > > > So, are you basically checking if current remaining bw can be > > > consumed safely? > > > > I check if the current runtime (rescaled based on the capacity) is > > smaller than the time to the current scheduling deadline > > (basically, if it can be consumed in time). > > > > However, if > > q / (d - t) > Q / P > > (where "q" is the current runtime, "d" is the scheduling deadline, > > "Q" is the maximum runtime, and "P" is the CBS period), then a new > > scheduling deadline will be generated (later), and the runtime will > > be reset to Q... So, I need to use the maximum budget and CBS > > period for checking if the task fits in the core. > > OK. I'd add a comment about it. Ok; I'll add a comment in the next version of the patchset. [...] > > > I'm not actually sure if looking at dynamic values is what we > > > need to do at this stage. By considering static values we fix > > > admission control (and scheduling). Aren't dynamic values more to > > > do with energy tradeoffs (and so to be introduced when starting > > > to look at the energy model)? > > > > Using the current runtime and scheduling deadline might allow to > > migrate a task to SMALL cores (if its remaining runtime is small > > enough), even if the rescaled Q is larger than P. > > So, in theory it might allow to reduce the load on big cores. > > > > If we decide that this is overkilling, I can just drop the patch. > > So, my first impression was that we shouldn't be too clever until we > start using info from the energy model (using which one should be able > to understand if, for example, reducing load on big cores is a winning > power/perf decision). Ok. > However, I was also wondering if we should actually compare dynamic > parameters with {running,this}_bw (per-rq) the moment we search for > potential migration candidates (so that we are not overloading rqs). Notice that all this logic is used only to select one of the idle cores (instead of picking the first idle core, we select the less powerful core on which the task "fits"). So, running_bw does not provide any useful information, in this case; maybe this_bw can be more useful. Luca