From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 020ADC433EF for ; Thu, 28 Oct 2021 07:18:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B336960E54 for ; Thu, 28 Oct 2021 07:18:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B336960E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ibRl2xwhIE7JjU2r08sEJWS2KFxSI9YCd2zEfLTRuU4=; b=hrx6gApCSo+8/nIE86pw5WC7F/ iOnC4F4Z4cG4mFL7tiz2tGTz6zmm+6ZqX5zB/lubSxfPTEpBHN88PreZu17LkHbAT7UcWsknrf2uJ Zd6QgWm7tiwU4crgb1KrytWsTWICdJ7PxJYah5Ja4wvblr86ECl+YPvllBpyNO7CI9ILy0GGCjITb nyS1UH/c82Df7P3fl4E0cBQ8mhN9OkKoIRfKS6CSeOaMnr4Ma90/LdigTSGLxCoB0RRbPHOx18m6+ Yn/fPKtn65InE4ZmZnKnoHs37VHNNQHa70EPCoJyfAYstvpgmNmZWZiPou4w7VzFKBC1K1a21UFUB iSHk+Gvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfzem-0075Lj-Ac; Thu, 28 Oct 2021 07:17:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfzej-0075L8-Ed for linux-arm-kernel@lists.infradead.org; Thu, 28 Oct 2021 07:16:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED08E1063; Thu, 28 Oct 2021 00:16:52 -0700 (PDT) Received: from [10.57.25.153] (unknown [10.57.25.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F8A63F73D; Thu, 28 Oct 2021 00:16:49 -0700 (PDT) Subject: Re: [PATCH v2 1/5] arch_topology: Introduce thermal pressure update function To: Bjorn Andersson Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, viresh.kumar@linaro.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, thara.gopinath@linaro.org, agross@kernel.org References: <20211015144550.23719-1-lukasz.luba@arm.com> <20211015144550.23719-2-lukasz.luba@arm.com> From: Lukasz Luba Message-ID: Date: Thu, 28 Oct 2021 08:16:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211028_001657_573568_65A485BE X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/27/21 7:43 PM, Bjorn Andersson wrote: > On Fri 15 Oct 07:45 PDT 2021, Lukasz Luba wrote: >> diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h > [..] >> +/** >> + * topology_thermal_pressure_update() - Update thermal pressure for CPUs >> + * @cpus : The related CPUs for which capacity has been reduced >> + * @capped_freq : The maximum allowed frequency that CPUs can run at > > I know this matches what I see in e.g. the Qualcomm cpufreq hw driver, > but in what cases will @capped_freq differ from > cpufreq_get_hw_max_freq(cpumask_first(cpus))? The @capped_freq is the maximum allowed frequency value due to thermal reasons, which will always be lower or equal to the value returned by cpufreq_get_hw_max_freq() (effectively: 'policy->cpuinfo.max_freq'). We limit the frequency (and voltage) of CPU to reduce power (and heat) in the passive cooling system. That information is important to us, because scheduler needs to know how fast the CPU can go. It cannot assume that the speed is always 'policy->cpuinfo.max_freq'. Often it's less then that at heavy load or GPU heavy load (the same SoC). Regards, Lukasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel