Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp878511imm; Tue, 15 May 2018 10:26:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpjffKo7ccCdAkZLhSwnzNAZfNfb3DmtlG+K1brr1JBW9XdOphTZ67qU+ZUjTb/7o+tJKDW X-Received: by 2002:a17:902:6045:: with SMTP id a5-v6mr15283522plt.138.1526405219199; Tue, 15 May 2018 10:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526405219; cv=none; d=google.com; s=arc-20160816; b=0OcVT59pjn2yuir94VBFQIt1JgqD8uH/6TCMHp5jHpt3ecfxdRXGujh7gp8cBPg/wV MtdRRIVd9XQ9g7ByNr7IACU7nly25D5qcjgHCP42rCzxrMBYwYtElZbldL3K3ZxMQHJX cZEol0qjIRIb3snWyvb5dSc/tJ7IR7zSKVYKrJDeRnHT3dllIBOUwgqjdmEJPXu5F6iJ 8cmsE59P3i7bpT2ZfOyykU+Yb+xg6g2cORdFXPcYJwY6+EGs65H/BrtAm2Li3GfLwZNs /QEZAfcwfbRxqX2c9ISmnfTPAvlZfPAplbT6WnA5Njeq2TmqEWzmmJu3mUYwinl5A9YW bF3Q== 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:arc-authentication-results; bh=BVASTbPPXgai3LBYrNVTC1y2u8tDVKYx2wXI825KyeI=; b=ykRIZ8H6CUuJLqASnwznMIhVuWA1AcmO2Q6xmvJCAuCZ4tUTwEA9oA+oHVpYrcX5AW qa/yg6Ei5obqxUHClNUOWIYSpqq/eFRQmE+2mfTE8wpm7gqE5cKbcIEi9APsTlPrmrsF G28YRQxjfJtFZc5SdOX3OCdGjpssuHbPOOMVlWjevyXIBJDqmOF7QpC0N4Il+UbpcSQm 2Jh/6ZFynoJXGiM8ShDYADAna5+aP5S/EWjIDveT1Lsmyv+gUfwG+dnsn/XVFHgjOYU6 Y6lido9GNp3vGiIDtl1F443cOdq66gUkKAcjK+tZsFtFoZeVWDMHEvJp+EIev0FCXGee YRTQ== 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 y3-v6si493033pfa.181.2018.05.15.10.26.43; Tue, 15 May 2018 10:26:59 -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 S932197AbeEOR0E (ORCPT + 99 others); Tue, 15 May 2018 13:26:04 -0400 Received: from foss.arm.com ([217.140.101.70]:36276 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754254AbeEOR0D (ORCPT ); Tue, 15 May 2018 13:26:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B97081435; Tue, 15 May 2018 10:26:02 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8203E3F25D; Tue, 15 May 2018 10:26:00 -0700 (PDT) Date: Tue, 15 May 2018 18:25:58 +0100 From: Patrick Bellasi To: Peter Zijlstra 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: <20180515172557.GK30654@e110439-lin> 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> <20180515165304.GH12217@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180515165304.GH12217@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-May 18:53, Peter Zijlstra wrote: > 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: > > 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? Sure, that's better to keep on a separate patch. For the time being I'll just update this last patch with the above snippet just to have the same behavior we have right now. Then maybe we can also split this last patch into a separate series to better evaluate the ideas to have "explicit" updates. -- #include Patrick Bellasi