Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2015566yba; Thu, 25 Apr 2019 09:16:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGI9ubYH/oc3PjBiPJcngjrz0zvRzJoy/Rm598AXCOwwElBxbtXXDZ8A4DNCNaFneMDmZp X-Received: by 2002:a62:ab13:: with SMTP id p19mr40822089pff.131.1556208995243; Thu, 25 Apr 2019 09:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556208995; cv=none; d=google.com; s=arc-20160816; b=oD634eAgHfojuxZW4/4QJV8/QnNcNxfweflak3tk7idgoKjTK1ZhGV6T6a57rk7wmh VG8lOktsp70u5Z2cXXzv+fbHJuLV8I59C4NNU4aHsR04wo45c1rtLyEXm3XNJAvlgBWj ipWtY2Mayd28EQLbqpXtkpq2l/NCo5I2GGXpaq8VfC6UNldMRCMIrH6/+skMoKhnufi3 d1JkYD+HbC5uMEBJr1PCSSCvW9Jd028qwZZskxNGOiXNGE/2BNYysdskzjd6P7dLPe+X g/FryBdVMm9GUK/cvnea8p0OnjtaDc3Zk1NSt/Z2/zPRFaNrLxRkwKPXHXcTH0yMd9ol QfnA== 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=+NgVM28st2s3nluv4L38cYJpIMw2F4j5BIkGMP0hO5Y=; b=PYl0IR1rUKN2yo8L0L8ut791gQB+8V4dAkk6Cs6BaK+cqt/OPD4Y+qMu3b+UiiIiyZ vwaj3LNYCyjgRVjWIhhRUFWjD7ldP0OfH71XsRUn126O6+NPth8STFR1neVgd1/PwAGG 29dXLKQcOa9Rulo6HVDIxzk8UiwA0f4whKFNPxPxa1BWHabYdFyDJUHKYmNCDjaTYzq9 XfB5hwBxY7pJyggIXfipQiAEyE9uWWZBJfiMZQdlVJhX1yikQnbpvx8O9zshRBhxZx5b aswe/AtaEe2WDE4wp3wns+ccG3ZO/ttMPeJvjMXIBsrUYtVBj0ML4Y9Tf49RwYLWc6nC kEQQ== 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 s79si23199757pfa.69.2019.04.25.09.16.19; Thu, 25 Apr 2019 09:16:35 -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 S1728853AbfDYKpS (ORCPT + 99 others); Thu, 25 Apr 2019 06:45:18 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40762 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfDYKpS (ORCPT ); Thu, 25 Apr 2019 06:45:18 -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 CB558374; Thu, 25 Apr 2019 03:45:17 -0700 (PDT) Received: from queper01-ThinkPad-T460s (unknown [10.37.8.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7AB9A3F5C1; Thu, 25 Apr 2019 03:45:14 -0700 (PDT) Date: Thu, 25 Apr 2019 11:45:07 +0100 From: Quentin Perret To: Thara Gopinath Cc: mingo@redhat.com, peterz@infradead.org, 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: <20190425104504.pbej3b74pwinx6jj@queper01-ThinkPad-T460s> References: <1555443521-579-1-git-send-email-thara.gopinath@linaro.org> <1555443521-579-4-git-send-email-thara.gopinath@linaro.org> <20190418094833.owlobrx6x5gclvhy@queper01-lin> <5CBF93F6.8000109@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5CBF93F6.8000109@linaro.org> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 23 Apr 2019 at 18:38:46 (-0400), Thara Gopinath wrote: > I think there is one major difference between user-defined frequency > constraints and frequency constraints due to thermal events in terms of > the time period the system spends in the the constraint state. > Typically, a user constraint lasts for seconds if not minutes and I > think in this case cpu_capacity_orig should reflect this constraint and > not cpu_capacity like this patch set. That might not always be true I think. There's tons of userspace thermal deamons out there, and I wouldn't be suprised if they were writing into the cpufreq sysfs files, although I'm not sure. Another thing is, if you want to change the capacity_orig value, you'll need to rebuild the sched domains and all I believe. Otherwise there is a risk to 'break' the sd_asym flags. So we need to make sure we're happy to pay that price. > Also, in case of the user > constraint, there is possibly no need to accumulate and average the > capacity constraints and instantaneous values can be directly applied to > cpu_capacity_orig. On the other hand thermal pressure is more spiky and > sometimes in the order of ms and us requiring the accumulating and > averaging. > > > > Perhaps the Intel boost stuff could be factored in there ? That is, > > at times when the boost freq is not reachable capacity_of() would appear > > smaller ... Unless this wants to be reflected instantaneously ? > Again, do you think intel boost is more applicable to be reflected in > cpu_capacity_orig and not cpu_capacity? I'm not even sure if we want to reflect it at all TBH, but I'd be interested to see what Intel folks think :-) Thanks, Quentin