Re: [PATCH] cpufreq: conservative: Drop cached requested_freq
From: Rafael J. Wysocki
Date: Thu Mar 12 2026 - 11:48:07 EST
On Thu, Mar 12, 2026 at 3:48 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> On 12-03-26, 15:03, Rafael J. Wysocki wrote:
> > So cs_dbs_update() does this:
> >
> > if (requested_freq > policy->max || requested_freq < policy->min) {
> > requested_freq = policy->cur;
> > dbs_info->requested_freq = requested_freq;
> > }
> >
> > Why is it not sufficient?
>
> Because requested_freq is within those limits, it was policy->cur
> which wasn't within these limits, but that too came within that by the
> time cs_dbs_update() gets called after the readjustment.
But how exactly does policy->cur get out the limits?
I guess there's some notification from the firmware or similar that
causes the limits to be updated, but the only way policy->cur can
change is to still fall between the new limits AFAICS. Or if it is
not the case, there is a bug somewhere in the core.