Re: [PATCH] cpufreq: conservative: Drop cached requested_freq

From: Viresh Kumar

Date: Thu Mar 12 2026 - 10:54:25 EST


On 12-03-26, 19:13, zhenglifeng (A) wrote:
> On 3/10/2026 2:34 PM, Viresh Kumar wrote:
> > A recently reported issue highlighted that the cached requested_freq
> > is not guaranteed to stay in sync with policy->cur. If the platform
> > changes the actual CPU frequency after the governor sets one (e.g.
> > due to platform-specific frequency scaling) and a re-sync occurs
> > later, policy->cur may diverge from requested_freq.
> >
> > This can lead to incorrect behavior in the conservative governor.
> > For example, the governor may assume the CPU is already running at
> > the maximum frequency and skip further increases even though there
> > is still headroom.
> >
> > Avoid this by dropping the cached requested_freq and using
> > policy->cur directly.
> >
> > Reported-by: Lifeng Zheng <zhenglifeng1@xxxxxxxxxx>
> > Link: https://lore.kernel.org/all/20260210115458.3493646-1-zhenglifeng1@xxxxxxxxxx/
> > Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> > ---
> > Lifeng Zheng, can you please give this a try and provide your Tested-by as well
> > ?
>
> I tested it on our platform, and the behavior is as expected.
>
> Tested-by: Lifeng Zheng <zhenglifeng1@xxxxxxxxxx>

Can you also test the next patch as well please ?

--
viresh