Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2105649yba; Thu, 25 Apr 2019 10:42:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLpkUtrutsMuTmIRDIX+SymhDqtY4OQ6kkzaSe8oB0Ku20LYfY4rvQJeO8hWJi/GV5zz4d X-Received: by 2002:a17:902:8c89:: with SMTP id t9mr41695027plo.265.1556214123944; Thu, 25 Apr 2019 10:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556214123; cv=none; d=google.com; s=arc-20160816; b=GquvecgRBTNq8XyV84+xtUTsLrKaKaSK16hN5AXbeI+THuU3VmoGIv6HxYGvHwLlE1 cPZl8qp8NkjlIh+5YgyhY1FCoFb08e6+psZ+dQPrPNj7eTiBf8eY4+WqZxK+Ln2+BHOF V/390lOCwIAanTrQC+QPZ40T7oAIb/fo87kTDnVut3kCv8VmXpXiRyR4/bZkIpWVp7A7 SsvKR9QiA2t4vz3LtzDsaAMuvr1euKjO+6Xxh8WkHxaHPBEPvgGBtSvu6rl5x1ELpYDW AnTF9OqeJvEMSkTcalJeRShSqCqWXkH1+JbyE15tSaJQGLEfc/EIePZ5+D+KQeuRUHmw E5zg== 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=4cO2pI4sPeB9QdsR32Dkqm/JTMrauWgV9TzIbm0RIWg=; b=RjntRmU4X5xGfGLgTS/D8zNvn5aMc+NPMRLnYE3IJkHJNUwPchTlzOvHm/ClMsE7OU tMAih8vNwfoaEKthTWRiqyQuLy5RlqKs6a8Q4wdfsnC9CfwRiaVhv0P/FGYpvxfbv4q0 0HSW3cpdyfXV9brRF/qrLB2rYlbLjA+dqJcMZrTjgMpvq3LGcJdriwoSpaBAGWF9aSIM jViE7BvkO838pYiy+lHDwqR/h0jua+juRF6+eEe6wF3yVtsCqdfYaBU77yOy9+UAUfVs vLS9rzi64lw0Urdy+1M2Z6I4Moz6TXBfz0aOYsVpPkyy4ZCJ78pfLNXWhrIp4+gOKcvW WEYA== 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 a5si17434827pgd.488.2019.04.25.10.41.47; Thu, 25 Apr 2019 10:42:03 -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 S1727995AbfDYMum (ORCPT + 99 others); Thu, 25 Apr 2019 08:50:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43248 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727738AbfDYMum (ORCPT ); Thu, 25 Apr 2019 08:50:42 -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 2E849A78; Thu, 25 Apr 2019 05:50:42 -0700 (PDT) Received: from queper01-ThinkPad-T460s (unknown [10.37.8.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA81A3F5C1; Thu, 25 Apr 2019 05:50:38 -0700 (PDT) Date: Thu, 25 Apr 2019 13:50:36 +0100 From: Quentin Perret To: Vincent Guittot Cc: Thara Gopinath , Ingo Molnar , Peter Zijlstra , Zhang Rui , linux-kernel , Amit Kachhap , viresh kumar , Javi Merino , Eduardo Valentin , Daniel Lezcano , Nicolas Dechesne , Bjorn Andersson , Dietmar Eggemann Subject: Re: [PATCH V3 3/3] thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping Message-ID: <20190425125033.pe5ya6me5sr4diix@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> <20190425104504.pbej3b74pwinx6jj@queper01-ThinkPad-T460s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 25 Apr 2019 at 14:04:10 (+0200), Vincent Guittot wrote: > On Thu, 25 Apr 2019 at 12:45, Quentin Perret wrote: > > > > 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. > > They would better use the sysfs set_target interface of cpu_cooling > device in this case. Right > > 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. > > That would be the goal, if userspace uses the sysfs interface of > cpufreq to set a new max frequency, it should be considered as a long > change in regards to the scheduling rate and in this case it should be > interesting to update cpacity_orig and rebuild sched_domain. I guess as long as we don't rebuild too frequently that could work. Perhaps we could put some rate limiting in there to enforce that. Though we don't do it for hotplug so ... :/