Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp838811imm; Tue, 15 May 2018 09:53:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZJsnkxSwa3VWdQUBVa8+atiwcii8pyrhajpJ8HnIFOpTSIccp+Evo8TYWkcwSUvvfz7Bt X-Received: by 2002:a62:5281:: with SMTP id g123-v6mr15846493pfb.22.1526403238505; Tue, 15 May 2018 09:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526403238; cv=none; d=google.com; s=arc-20160816; b=mMatOyYQ5kGjtwojqf3f9k1f5BfPz6u8mJRNMyq1UCp4gwNPVRBG/8pDHSS+s82fuJ RqgF7WjMrIkPgJWGkzxn23CX4ZUVmI/Xg3D2s0RT0c0vqn1ipqTXtMGW3liYotw+p8KK VNFxUB+mM7kk3tfvyrHboKGLE5hBBPU8SjIPTGsMQp33No9amY2i3shEk1pbZKTtOxJD wq7yXGUlW9/C+4RYlc1uzsx1ciJwsD+tThp+xTFvEyFVkn22Xi6l89+RizmOyoqMB51q SEQTUMeQOryVaIVgKjQA+cCbr+Lwc4jBkgkMyWcX741x4xz8NgHt4NFUQPA09ABwi00q eahA== 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:dkim-signature:arc-authentication-results; bh=bqY4sMetDo2IvzFxOBxV5mw8WB5oG8dlBj2mmjZmPGg=; b=JBwgEqDhDF+EliE5OwTlBqyTxYchjJj/k9YmZFheWu4VE9LHgLudGNqvpCd8zaBeOP DSh9ANk+P6HXGdL8cO6j82tg71xT+rsU8Oxf6ksjKYkZ4HwdnUxczV7JrYy65brHW/M+ Ob1Hf1iXIdJrgTjNjkuGAKJTQDs21TcyFm0LAaGu3+0MIw4zrznCNJ4WLdUxH3C5DXUD +LcH8kLS7bGs7ZtHanJSjq47HNFvXd1nT8p0w37G8RV1zSv5JcHkQ0ag3Mgc++Pun8bT 8pItEZVOc/LxfNo71el4tevW5SdtGJv3vKALl1tzZeL6+ivEZt41Pjhh3n8x7sLaYgqU SRDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=KTaQyn0S; 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 a5-v6si315650pgc.537.2018.05.15.09.53.44; Tue, 15 May 2018 09:53:58 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=KTaQyn0S; 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 S932111AbeEOQx1 (ORCPT + 99 others); Tue, 15 May 2018 12:53:27 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56580 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbeEOQxZ (ORCPT ); Tue, 15 May 2018 12:53:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bqY4sMetDo2IvzFxOBxV5mw8WB5oG8dlBj2mmjZmPGg=; b=KTaQyn0SOgCwlEpB1QwNbVfWA ly9+qw80S7tMh0EnIgtqPxhIFF7EXn04WiMsV1IEurDU3UJyWycHM9zNhQl7cH84iwqPphAdJmy44 ULmIA0ZgCQ2NwLfKMdUFAM/6yOC2gYwi3lEywncIrHXbgOB2bmDm/HD/u2nD/VB2E2ajWt+EDsyYR REi4Dz2XfaMzdgChOlOg7qnNranNkMFljX3PiYdFfvAvuiXmrNIO/TvOsHkbc5ezsI6lXtlk7prua 9hBtuG02vAyylH/zRGVCu6xDMaR0zARF5eji2Bs7SfFgzt/MU7nXU/a7nUTPiDHaiVJBZkO66XpIz N9riIrXQQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIdCE-00067V-Rx; Tue, 15 May 2018 16:53:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2E5AB2029F86E; Tue, 15 May 2018 18:53:04 +0200 (CEST) Date: Tue, 15 May 2018 18:53:04 +0200 From: Peter Zijlstra To: Patrick Bellasi Cc: Vincent Guittot , Joel Fernandes , linux-kernel , "open list:THERMAL" , Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Joel Fernandes , Steve Muckle Subject: Re: [PATCH 3/3] sched/fair: schedutil: explicit update only when required Message-ID: <20180515165304.GH12217@hirez.programming.kicks-ass.net> References: <20180510150553.28122-1-patrick.bellasi@arm.com> <20180510150553.28122-4-patrick.bellasi@arm.com> <20180513060443.GB64158@joelaf.mtv.corp.google.com> <20180513062538.GA116730@joelaf.mtv.corp.google.com> <20180514163206.GF30654@e110439-lin> <20180515145343.GJ30654@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180515145343.GJ30654@e110439-lin> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 03:53:43PM +0100, Patrick Bellasi wrote: > On 15-May 12:19, Vincent Guittot wrote: > > On 14 May 2018 at 18:32, Patrick Bellasi wrote: > > Yes se becomes NULL only when you reach root domain root group; domains are something else again ;-) > Thus, the scheduler knows that we are going to sleep: does is really > makes sense to send a notification in this case? It might; esp. on these very slow changing machines. > What about adding a new explicit callback at the end of: > update_blocked_averages() ? > > Something like: > > ---8<--- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index cb77407ba485..6eb0f31c656d 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7740,6 +7740,9 @@ static void update_blocked_averages(int cpu) > if (done) > rq->has_blocked_load = 0; > #endif > + > + cpufreq_update_util(rq, SCHED_CPUFREQ_IDLE); > + > rq_unlock_irqrestore(rq, &rf); > } > ---8<--- > > Where we can also pass in a new SCHED_CPUFREQ_IDLE flag just to notify > schedutil that the CPU is currently IDLE? > > Could that work? Simlarly you could add ENQUEUE/DEQUEUE flags I suppose. But let's do all that later in separate patches and evaluate the impact separately, OK?