Re: [PATCH v2 2/2] cpufreq: CPPC: Dont read counters for idle CPUs

From: Prashant Malani
Date: Mon Jul 21 2025 - 15:40:36 EST


Hi Rafael,

Thanks for looking into this.

On Mon, 21 Jul 2025 at 10:00, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>
> On Tue, Jul 15, 2025 at 8:28 AM Prashant Malani <pmalani@xxxxxxxxxx> wrote:
> >
> > +Sudeep.
> >
> > On Mon, 14 Jul 2025 at 02:31, Beata Michalska <beata.michalska@xxxxxxx> wrote:
> > > So I believe this should be handled in CPUFreq core, if at all.
> > > Would be good to get an input/opinion from the maintainers: Viresh and Rafael.
> >
> > Viresh, Rafael, Sudeep, could you kindly chime in? The unreliability
> > of this frequency
> > measurement method in CPPC is affecting the cached frequency saved by CPUFreq,
> > which in turn affects future frequency set calls.
>
> I gather that "the cached frequency saved by CPUFreq" means policy->cur.

Yes, that's right.


>
> > It would be great if we could solve this in CPUFreq core (maybe not
> > rely on the cached frequency while setting the new one [3]?)
>
> I see what you mean now.
>
> Why don't you flag the driver as CPUFREQ_NEED_UPDATE_LIMITS?
>
> That would kind of make sense given how the driver works overall, or
> am I missing anything?

Sounds fine to me (it doesn't fix the lingering accuracy issue, but at
least frequency
setting will get unblocked). I can put together a patch if there are
no objections.

Thanks,