Re: [PATCH 0/2] cpufreq: governor: Apply limits with target_freq instead of policy->cur
From: Viresh Kumar
Date: Thu Mar 12 2026 - 02:16:13 EST
On 10-03-26, 21:11, zhenglifeng (A) wrote:
> I basically agree with what you said. But I have a little question. Do you
> think the target freq should be updated when querying cpuinfo_cur_freq? I
> think it should only be updated by governor or when limits changed.
I am not sure I understand the question. Where are we updating
target-freq ? As far as cpuinfo_cur_freq goes, there is no need to
make any changes when that is queried but..
- cpufreq core caches the currently known freq as policy->cur and uses
it everywhere.
- When cpuinfo_cur_freq is queried, we go and check with the hardware,
what the frequency is.
- If a difference is found, we align policy->cur with that, given it
is still withing policy limits. That's all.
--
viresh