From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rafael@kernel.org>,
"'Jing Wu'" <realwujing@gmail.com>
Cc: "'Srinivas Pandruvada'" <srinivas.pandruvada@linux.intel.com>,
"'Viresh Kumar'" <viresh.kumar@linaro.org>,
"'Rafael J. Wysocki'" <rafael.j.wysocki@intel.com>,
<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
"Doug Smythies" <dsmythies@telus.net>
Subject: RE: [PATCH v1] cpufreq: intel_pstate: Adjust policy->cur in active mode to policy
Date: Thu, 30 Jul 2026 08:01:31 -0700 [thread overview]
Message-ID: <000401dd2034$4ed282b0$ec778810$@telus.net> (raw)
In-Reply-To: <000d01dd1fb2$1da56040$58f020c0$@telus.net>
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]
On 2026.07.29 16:30 Doug Smythies wrote:
> On 2026.07.29 11:40 Rafael wrote:
>> On Wednesday, July 29, 2026 10:59:24 AM CEST Jing Wu wrote:
...
>>> arch_freq_get_on_cpu() falls back to cpufreq_quick_get(), i.e.
>>> policy->cur, whenever its APERF/MPERF sample goes stale. A CPU whose
>>> tick keeps running refreshes that sample constantly and rarely hits
>>> the fallback, but an isolated CPU covered by nohz_full with a single
>>> runnable task never gets another tick, so it permanently reports the
>>> floor through this fallback - even though it is genuinely pinned to,
>>> and running at, the frequency computed just above.
I was unable to recreate your described situation.
With some isolated CPUs and a single runnable task, the reported
frequency was always accurate, and when there was no task the stale
frequency was as expected.
...
>> Good idea overall, but it takes a bit more to do this. In particular, the HWP
>> case needs some more care.
>>
>> Also, I don't think that this really is a fix. The code works as intended,
>> although what it does is sometimes confusing.
>
> Yes, and by agreement at the time (or so I think I recall) we
> were trying to get all CPU frequency scaling drivers and governors to
> display the same thing when the frequency was stale.
> We wanted to: 1, make it more obvious that the frequency was stale;
> 2, keep the listed stale frequency within the currently set limits.
> The drivers were intel_pstate (with both HWP enabled and disabled),
> intel_cpufreq (with both HWP enabled and disabled), and acpi-cpufreq.
> We decided on the currently set minimum CPU frequency.
>
> There was a problem with driver = intel_cpufreq, governor = schedutil,
> HWP enabled, where it would might not show the current minimum
> frequency as the stale frequency, that remains to this day.
> (i.e. I have never figured out a fix after my initial attempt was rejected, [1])
>
>> Below is my version of this change (on top of linux-next), please let me know
>> if it works for you.
>>
>> Thanks!
>
> I was part way through looking at and testing Jing's version of the patch.
> I'll abandon that and try yours.
Thanks, your patch also eliminates a lingering difference in reported stale
frequencies with the performance governor between the intel_pstate and
intel_cpufreq CPU frequency scaling drivers.
A table of all combinations is attached.
Reviewed and tested by dsmythies@telus.net
>
> ... deleted the rest ...
>
> [1] https://lore.kernel.org/linux-pm/CAAYoRsU2=qOUhBKSRskcoRXSgBudWgDNVvKtJA+c22cPa8EZ1Q@mail.gmail.com/
... Doug
[-- Attachment #2: stale-freq-values-kernel-7-2-rc5.png --]
[-- Type: image/png, Size: 82358 bytes --]
next prev parent reply other threads:[~2026-07-30 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 8:59 [PATCH] cpufreq: intel_pstate: Sync policy->cur to the pinned pstate Jing Wu
2026-07-29 18:40 ` [PATCH v1] cpufreq: intel_pstate: Adjust policy->cur in active mode to policy Rafael J. Wysocki
2026-07-29 23:29 ` Doug Smythies
2026-07-30 15:01 ` Doug Smythies [this message]
2026-07-31 17:05 ` Rafael J. Wysocki (Intel)
2026-07-31 17:20 ` srinivas pandruvada
2026-08-03 18:15 ` [PATCH v1] cpufreq: intel_pstate: Avoid using DESIRED_PERF when DEC is enabled Rafael J. Wysocki
2026-08-04 17:58 ` srinivas pandruvada
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='000401dd2034$4ed282b0$ec778810$@telus.net' \
--to=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=realwujing@gmail.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/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