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 DFE51C433EF for ; Thu, 28 Oct 2021 23:12:35 +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 A1E3B610CA for ; Thu, 28 Oct 2021 23:12:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1E3B610CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tHLvrlJMdpQEvmmAj8UB3bmvucvMChG+Zni69MmeF/E=; b=dUPeG99L7PF9P3 nlhsgfzNlF2MLyApHMIYZNGDYb+ad6qAC8IpcB+85XPZ9UnN5PrazCpoCsSir3+2797/nfTAurVax obXufCjy/g45E6lv1PjpYeL9OQtQlFk8Cv+CXxQw2eJHyxQ0I7TAtHMmh9vN9JPGWMCDcTEhYuZbW 8ivbLXTq2ReZM15/HLh2SL+WeuEg6c9cTR7+JHQfKRxJktak7JZ8BoXHkB6n1mKzlx7QL/TL8e7j1 wAjgQAczhy4EAlttMywFjI3YYWBPdTsdNaInuyoXsi5MvbHzR5aChYQXYaC1J+vOCm4gjuPMHrCHy X9vNQOHz5OBI1zjfUvVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgEXi-009Hh3-B9; Thu, 28 Oct 2021 23:10:42 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgEXf-009HgL-1E for linux-arm-kernel@lists.infradead.org; Thu, 28 Oct 2021 23:10:40 +0000 Received: by mail-ot1-x32b.google.com with SMTP id x27-20020a9d459b000000b0055303520cc4so10862093ote.13 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=vCNvT0cD4tELrk66NDDqIWEd+t6PYur6XIgkU+ccfXIHOItKvz9S9kbzTuZYTdcMW8 tzzNseIzCBA5kV736k+T6T1NZBiwAn+TOqUogzXMdRzo90kVM7hzv65qzqnBxoIErtmo 5CFNt3ZGRbQYAmFVqCjpzb3fXINbwHFhcwkLxumKiD3qcLxBodYvEZ3DovgW8UIaDh3w LebL+Gblk4QD/j5OBuC9g8zd9yDhl/8Utc0dNlBbD/IY7NmZjt5ECTrZ0mt3FXWC3dIf 9HNNppSR5Oy8QSdvujUrhS6Or+8B1TFc/Axzqocp64IEC4+6kyZrEjIHGmHq7RLO/8LJ 5ZFQ== X-Gm-Message-State: AOAM532UEmFggM85xTbEujRZ3LsCwemYphgWdWzPY88cA9Sez9RDLuUN sW3tkeKTZ5SQz/vcox9a+ComHQ== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211028_161039_188214_D5B52783 X-CRM114-Status: GOOD ( 17.30 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel