From: Jie Zhan <zhanjie9@hisilicon.com>
To: Breno Leitao <leitao@debian.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Lifeng Zheng <zhenglifeng1@huawei.com>,
Pierre Gondois <pierre.gondois@arm.com>,
Sumit Gupta <sumitg@nvidia.com>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <dcostantino@meta.com>,
<pjaroszynski@nvidia.com>, <Al.Grant@arm.com>,
<linux-arm-kernel@lists.infradead.org>, <kernel-team@meta.com>,
"zhangpengjie (A)" <zhangpengjie2@huawei.com>
Subject: Re: [PATCH] cpufreq: cppc: discard out-of-range delivered_perf samples
Date: Fri, 8 May 2026 16:55:26 +0800 [thread overview]
Message-ID: <a1ac9710-44fb-46e9-857d-2c2e9dff5457@hisilicon.com> (raw)
In-Reply-To: <af2cEiouQbdpoavG@gmail.com>
On 5/8/2026 4:17 PM, Breno Leitao wrote:
> Hello Jie,
>
> On Fri, May 08, 2026 at 11:23:18AM +0800, Jie Zhan wrote:
>> On 5/2/2026 12:32 AM, Breno Leitao wrote:
>>> cppc_cpufreq_get_rate() derives delivered_perf as:
>>>
>>> delivered_perf = reference_perf * delta_delivered / delta_reference
>>>
>>> over a short udelay()-bounded window between two cppc_get_perf_ctrs()
>>> calls. Per-read latency jitter on the underlying CPC register access
>>> can skew the ratio, occasionally producing delivered_perf >
>>> highest_perf. cppc_perf_to_khz() then linearly extrapolates above
>>> (nominal_perf, nominal_freq), so the value reported via
>>> /sys/.../cpufreq/cpuinfo_cur_freq exceeds cpuinfo_max_freq.
>>>
>>> Observed on an arm64 host (governor=performance,
>>> cpuinfo_max_freq=3339 MHz): 15 back-to-back reads returned values
>>> between 2997 and 4230 MHz.
>> Hi Breno,
>>
>> Frequency sampling discrepancy through 'cpuinfo_cur_freq' in the
>> cppc_cpufreq driver has been an issue discussed for a very long time.
>
> Thanks for the heads-up.
>
>> If the CPPC feedback counters are FFH on your platform, can you have a look
>> at [1] and see if that helps?
>
> Have you forgot to get the [1] link here?
Yeah, totally forgot, sorry!
[1] https://lore.kernel.org/lkml/20260410094145.4132082-1-zhangpengjie2@huawei.com/
>
> Thanks for looking at this,
> --breno
prev parent reply other threads:[~2026-05-08 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 16:32 [PATCH] cpufreq: cppc: discard out-of-range delivered_perf samples Breno Leitao
2026-05-01 17:41 ` Jeremy Linton
2026-05-05 12:52 ` Breno Leitao
2026-05-08 3:23 ` Jie Zhan
2026-05-08 8:17 ` Breno Leitao
2026-05-08 8:55 ` Jie Zhan [this message]
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=a1ac9710-44fb-46e9-857d-2c2e9dff5457@hisilicon.com \
--to=zhanjie9@hisilicon.com \
--cc=Al.Grant@arm.com \
--cc=dcostantino@meta.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pierre.gondois@arm.com \
--cc=pjaroszynski@nvidia.com \
--cc=rafael@kernel.org \
--cc=sumitg@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=zhangpengjie2@huawei.com \
--cc=zhenglifeng1@huawei.com \
/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