Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2094448pxb; Thu, 28 Oct 2021 16:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygLBWRm2jnxCzyM8MtJeU8/NEgWkQIl/W6WnGHcQMPWNijqwCUlrCfqshxlBZJ9xW/NUd+ X-Received: by 2002:a17:907:868b:: with SMTP id qa11mr9261519ejc.383.1635462775875; Thu, 28 Oct 2021 16:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635462775; cv=none; d=google.com; s=arc-20160816; b=rYcQkwW2EH6IMVlfJk81RkKiQjzWMPF6fZtHuPgHe3WuGWHNrBwBvcradN70rbcxZW 5zeOo0kKk0ZHMr6Q/bQlpNWr+xa0P7c80h2JF651cDwUBXIrPV58Gku8+jddBtpqoNKM C3xYQ47UkjRLQbjffSBDku9V8vT+1YngyezUjyByrqk66Y3E7IOm/ZDTW6n1fhtcZvc0 TmLZ3LspLJbCNvkdfXXfviokU3ptrQg5FRFo5JRlI+8AumiVT7OlwS8V4JO1pz3xdxyQ NlIFvVGn2fhQ5aR6q1aTKlfymxgOrSfT3vLR/DAVaqFE/wtQFmB9a4TzJh5147+XAW+E BFKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BFSAzS7o9HlqBi5yBxBAasptrHGEYLBBAIVppOSx0zE=; b=sfep+jiWWESamSguBY7qLL0+k9jRq+yMdVxO10ITiyNsWU9XlGbwaBiO9PJjImSe1o HK6AUDdDOb3BturBb9d1r9UlqutjQEs0Cf3UxMlimicvrArb+JZtaeFxrqkFuiCbCm4z vxiYToqtgqbRikN5+4wiGKUsWDmN+Jrl46NyOLySRiCkkkbyuXN3PnqjM5BqpmQ2YAXY +p57DRw0TxPIdR9HD0xwZ/8K7OfQiNAS5iNVgKSiCgLxcfkZyPn6bKdQyUGE3HVAi3Ox thJB5nkKnxgLaKM2A10ldK5G+ySoxjCIIrNqc5GIveIGpK9XL1IIUzGTAjVKJGYLHhwe 3kpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ldz/2tMA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt7si7485888ejc.688.2021.10.28.16.12.29; Thu, 28 Oct 2021 16:12:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ldz/2tMA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbhJ1XNF (ORCPT + 99 others); Thu, 28 Oct 2021 19:13:05 -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-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