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 EE485C433FE for ; Thu, 28 Oct 2021 23:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D26CE610E5 for ; Thu, 28 Oct 2021 23:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231442AbhJ1XNG (ORCPT ); Thu, 28 Oct 2021 19:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbhJ1XNF (ORCPT ); Thu, 28 Oct 2021 19:13:05 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACC75C061767 for ; Thu, 28 Oct 2021 16:10:37 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id v2-20020a05683018c200b0054e3acddd91so10903572ote.8 for ; Thu, 28 Oct 2021 16:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BFSAzS7o9HlqBi5yBxBAasptrHGEYLBBAIVppOSx0zE=; b=Ldz/2tMA9mEjSAT6YZFX6bVE8+AFjFwUdG/VRMnEffC1hkPWdXqY0OO0JUyhqrmuFD y2c6vMgpQZk5OcL7FYhXrmOW6PzacNCev+jtjVEWcT5o6NtHLweTPTXIxj561R3KoW7g m9l/57Ob8auaZ/Jr9HeY7YVoQXSqORo4aovRQaXx1PpfQ1etJiTQgVvWCI+1CM7DW3Q0 byw0z+xKukDVtb788ytfmBl7Y07wBqBUOVYbAo9dzrcpFQau8FYrL8thuM51QQmy1ixa +bhnIknd8vOHMdzt8PFUBhDjDrIieYndwmARS+taUxMcrFfduXE0+TJjs1HrueGtvH9j p2+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BFSAzS7o9HlqBi5yBxBAasptrHGEYLBBAIVppOSx0zE=; b=1rkSq4yhBIYN6vJA+p7nfXRyc4y3rzfmWeXEcmgGSAVrqaMxzZQJ175iEhsDLJUP0i QKBlgmBxp9a6ZpodflzR4sa0sz9Lb1/3umyaWJhs2BywhzsYW0+D22kFW3rJEjiMt+6n L471YQX0cqcr0Mplbve+vYjXcgIfiJPl9etDAXQehd0FNhikKdBO5gINjY1hqkzjszJa Xg0r3I+Ho1PvH+3MV15wxr1CC7Aen+KRUDwXlSlD7JJq9xqLLB0Ktvf3kHBblEBFbHS9 ChgBjSKTGTfBLnbaYWZbmoNrUzQCqDuKPE6fZmoHbS0Il2m/ylHT+jPWtmEW2Fx3/3yY h6Dw== X-Gm-Message-State: AOAM533OaV5YoezcZQ8TkQ1hF//ajEefKhLANiSm3AxUAHVumOYO7P35 PGDj5FiEiwLH9Z1beXlMehNoeA== X-Google-Smtp-Source: ABdhPJxuje1Z/hxzHYMVytECAJruwdjHNvR78MomsEqPj3n+UziSgWFIiXTDZuFc9NuZmH7OuJAq0Q== X-Received: by 2002:a05:6830:23a6:: with SMTP id m6mr5703798ots.38.1635462636964; Thu, 28 Oct 2021 16:10:36 -0700 (PDT) Received: from ripper (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id v9sm1467851oth.62.2021.10.28.16.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 16:10:36 -0700 (PDT) Date: Thu, 28 Oct 2021 16:12:27 -0700 From: Bjorn Andersson To: Lukasz Luba 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 Subject: Re: [PATCH v2 1/5] arch_topology: Introduce thermal pressure update function Message-ID: References: <20211015144550.23719-1-lukasz.luba@arm.com> <20211015144550.23719-2-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 28 Oct 00:16 PDT 2021, Lukasz Luba wrote: > > > 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'). > Read patch 3 and 4 again and now this makes sense to me. Thanks, Bjorn > 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