From: Hongyan Xia <hongyan.xia@transsion.com>
To: Jianyong Wu <wujianyong@hygon.cn>,
"rafael@kernel.org" <rafael@kernel.org>,
"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
"kprateek.nayak@amd.com" <kprateek.nayak@amd.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ray.huang@amd.com" <ray.huang@amd.com>,
"mario.limonciello@amd.com" <mario.limonciello@amd.com>,
"perry.yuan@amd.com" <perry.yuan@amd.com>,
"zhanjie9@hisilicon.com" <zhanjie9@hisilicon.com>,
"zhenglifeng1@huawei.com" <zhenglifeng1@huawei.com>,
"pierre.gondois@arm.com" <pierre.gondois@arm.com>,
"sumitg@nvidia.com" <sumitg@nvidia.com>,
"srinivas.pandruvada@linux.intel.com"
<srinivas.pandruvada@linux.intel.com>,
"lenb@kernel.org" <lenb@kernel.org>,
"zhongqiu.han@oss.qualcomm.com" <zhongqiu.han@oss.qualcomm.com>,
"jianyong.wu@outlook.com" <jianyong.wu@outlook.com>,
"wangfengyu@hygon.cn" <wangfengyu@hygon.cn>,
"zhongyuan@hygon.cn" <zhongyuan@hygon.cn>,
"huangsj@hygon.cn" <huangsj@hygon.cn>
Subject: Re: [PATCH] cpufreq: Use a non-boost reference frequency for pressure calculation
Date: Tue, 15 Sep 2026 09:32:59 +0000 [thread overview]
Message-ID: <b10f5ad9-c91d-446d-a382-e6b2ce0ff7fb@transsion.com> (raw)
In-Reply-To: <20260915065747.1671965-1-wujianyong@hygon.cn>
On 9/15/2026 2:57 PM, Jianyong Wu wrote:
> Commit d2d5c129d07e ("cpufreq: Make cpufreq_update_pressure() fall
> back to cpuinfo.max_freq") introduced cpuinfo.max_freq as the reference
> frequency for cpufreq pressure when arch_scale_freq_ref() returns zero.
>
> However, cpuinfo.max_freq may include boost frequencies and therefore
> does not necessarily represent the maximum sustainable frequency. On
> some systems using acpi-cpufreq, cpuinfo.max_freq includes boost while
> the frequency table only contains non-boost frequencies. Consequently,
> cpufreq pressure remains nonzero even without an additional frequency
> limit.
>
> Furthermore, drivers may update cpuinfo.max_freq when boost is enabled
> or disabled. With a fixed policy limit below the maximum non-boost
> frequency, this changes the pressure reference and hence the reported
> pressure, although the non-boost frequency limit remains unchanged.
>
> Add max_sustainable_freq to struct cpufreq_cpuinfo to provide a reference
> frequency excluding boost. Populate it from the nominal frequency in
> amd-pstate and cppc_cpufreq, the maximum non-turbo frequency in
> intel_pstate, and the highest frequency-table entry in acpi-cpufreq.
>
> Use this value when arch_scale_freq_ref() returns zero. Preserve the
> existing cpuinfo.max_freq fallback for drivers that leave the new field
> at zero.
Actually, what remaining platforms are out there that can hit this path?
From a quick look I think no x86 or Arm platforms can hit the fallback.
> Tested with acpi-cpufreq, intel_pstate, and amd-pstate in active and
> passive modes. With no additional frequency limit, pressure is zero.
> With a fixed limit below the non-boost reference frequency, pressure
> remains unchanged across boost transitions.
>
> Fixes: d2d5c129d07e ("cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq")
> Signed-off-by: Jianyong Wu <wujianyong@hygon.cn>
Looks okay to me.
Reviewed-by: Hongyan Xia <hongyan.xia@transsion.com>
> ---
> [...]
next prev parent reply other threads:[~2026-09-15 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 6:57 Jianyong Wu
2026-09-15 9:32 ` Hongyan Xia [this message]
2026-09-15 12:46 ` Jianyong Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b10f5ad9-c91d-446d-a382-e6b2ce0ff7fb@transsion.com \
--to=hongyan.xia@transsion.com \
--cc=huangsj@hygon.cn \
--cc=jianyong.wu@outlook.com \
--cc=kprateek.nayak@amd.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perry.yuan@amd.com \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=sumitg@nvidia.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wangfengyu@hygon.cn \
--cc=wujianyong@hygon.cn \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.com \
--cc=zhongqiu.han@oss.qualcomm.com \
--cc=zhongyuan@hygon.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®