Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp803386yba; Wed, 24 Apr 2019 09:50:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5ESauFCgeyrF75xLm4FXsVL+UJFhP+4JEcZ7BhQjJY8iCppQiq7g+CK5KBGDPFmgQrQ7Q X-Received: by 2002:a62:6f47:: with SMTP id k68mr34688107pfc.196.1556124641404; Wed, 24 Apr 2019 09:50:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556124641; cv=none; d=google.com; s=arc-20160816; b=cOSjSsnTYRJdXGKr80k0ZNhuMW8ie97eUhmwyMBGP1BQ8scftMCl8SRzreGhQOfiby hp9h2O1vCXtHjdp87AZaFqQ6HTCYPPr4r3GzeNDLDqYaGOzdaS1S8iReJMnsylS1Mm6f C9PWyIXrUiTjtl2Q9o6oqez+DbcRpaPHWty9gzp3nsLiM4oMGtPhs4zCWwVHDKlo4oLc ox0tzPKLlq8rpFqc4qR5SROYuKiABO4MPAt7QhrQf/PknJQAKJof+wmkwRlJ43YoQXFQ dcdcQ3BETpaa01PazKLkkkAvTeMvz0VRMLp4XQmrmMOCWFb5xlvSkuUYtB35CSpBrBFM mQ2g== 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; bh=dNi5KwP4lynMteREQ7r0+h3UYMU5MQJt6J0Mbq7DoEE=; b=fGHCeu19eNYrmr0Z93c6aY1RepSo2m7oiTVitz8IAxfHNVwlTmPz9Qjlgb1DjNOofh UdzLF4JxLFhORA9FgmwCKeCiq2GzbGwB5r0wP5dAmzIbsp5nMDqpZmSgwJluoPibDYKL YfatbUknUnhTftsQst6QIQM36zObVQk3g1Mt8bmUuZ6PYUQoAR8Qo87S+xgAzPO6ecLQ LXmvmJnnCE3KQ0lajFsqtAfZV1bn+PuwYzIagJVN/e6h0t3xhpLFOKm+tLswUJB07gBF +BGoW4UPP2eSPaHEUoeaPWpN6523MBu4mcsW9R6RsKQgvnf0bxGZbacM+V8rgEWKvXDE r9uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="bzGEqf/k"; 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 b96si16305343plb.426.2019.04.24.09.50.25; Wed, 24 Apr 2019 09:50:41 -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="bzGEqf/k"; 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 S1732571AbfDXQrQ (ORCPT + 99 others); Wed, 24 Apr 2019 12:47:16 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38962 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbfDXQrQ (ORCPT ); Wed, 24 Apr 2019 12:47:16 -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=dNi5KwP4lynMteREQ7r0+h3UYMU5MQJt6J0Mbq7DoEE=; b=bzGEqf/kHAcofHjhwQOzVt69G Y4aVy0iTohaWloSMfdnJSdzF1p58koNbllIzARfxA34coV3qvz043K3MHc3hS7gVSS95N8g8STkjU wX5PWZaxr8ujO24UyWXDcYXsxwV6CrjeblYGVhONOYnct+YOzMEPSGkW91MuAEhMuZi+okElwmFht heThNmOQoyDwQUqK9shLFH2bPoMorIw440bfWtVqy+Ox3LYhWI63ml+ad+TZlrAcDnB1A3H9yPadY zf5v0NJS9vs4+b/ktlx6VTHwQuY62MS3QVkX1EBdO8H3SGhjGqbgxZN8b4aQGGj/hwgXEUJBI6kv1 9YjcxFfuQ==; 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 1hJL39-0005yK-8C; Wed, 24 Apr 2019 16:47:11 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0556E203C0A58; Wed, 24 Apr 2019 18:47:10 +0200 (CEST) Date: Wed, 24 Apr 2019 18:47:09 +0200 From: Peter Zijlstra To: Thara Gopinath Cc: mingo@redhat.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, javi.merino@kernel.org, edubezval@gmail.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, nicolas.dechesne@linaro.org, bjorn.andersson@linaro.org, dietmar.eggemann@arm.com Subject: Re: [PATCH V3 3/3] thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping Message-ID: <20190424164709.GJ4038@hirez.programming.kicks-ass.net> References: <1555443521-579-1-git-send-email-thara.gopinath@linaro.org> <1555443521-579-4-git-send-email-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555443521-579-4-git-send-email-thara.gopinath@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 03:38:41PM -0400, Thara Gopinath wrote: > Enable cpufreq cooling device to update the thermal pressure in > event of a capped maximum frequency or removal of capped maximum > frequency. > > Signed-off-by: Thara Gopinath > --- > drivers/thermal/cpu_cooling.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > index 6fff161..d5cc3c3 100644 > --- a/drivers/thermal/cpu_cooling.c > +++ b/drivers/thermal/cpu_cooling.c > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > > #include > > @@ -177,6 +178,9 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, > > if (policy->max > clipped_freq) > cpufreq_verify_within_limits(policy, 0, clipped_freq); > + > + sched_update_thermal_pressure(policy->cpus, > + policy->max, policy->cpuinfo.max_freq); If it's already telling the cpufreq thing, why not get it from sugov instead?