Re: [PATCH v3 2/2] cpufreq: fix policy max not returning to non-boost freq on boost disable

From: Ananthu C V

Date: Thu Dec 03 2026 - 04:44:37 EST


On Mon, Nov 23, 2026 at 05:31:56PM +0100, Pierre Gondois wrote:
[snip]
> > > B. The new CPPC spec [1]
> > > The nominal freq. will be writeable in the future, so some additional
> > > synchronization will be required.
> > >
> > > ------------
> > > This patchset adds a cpuinfomax_base_freq field. Maybe we should also
> > > add a cpuinfo.max_boost_freq field to make it clearer when someone
> > > wants to get the max hardware freq. If we find a way to know when
> > > cpuinfo.max_boost_freq is a synthetic value, this would allow to
> > > solve [A].
> > The idea was exactly this when I went this route of calculating these
> > values separately. The previous revision was doing precisely this,
> > by adding a cpuinfo.max_table_freq field (fun fact, the initial name I
> > has was max_boost_freq itself, which I later changed to max_table_freq
> > because not everything is always boost capable :p). But the general
> > consensus was that, including the reviews from Rafael, we don't need a
> > new field added to track this value. And even for the max_base_freq
> > field the current revision is using, the general opinion seems to be
> > that we don't necessarily need such a field. Now, I am personally of the
> > opinion that adding these two fields (and calculating and storing them
> > once as you already mentioned) will make the calculations infinitely
> > simpler. What route should we really go?
>
> I also agree, but also Rafael pointed out that this could work without
> new fields [1]. Maybe there will be new elements in this thread
> and the direction will change (or not).

What do you think, Rafael? Should we stick with not adding any new fields,
or does it make more sense to add them in light of the new discussions?

> [1] https://lore.kernel.org/all/CAJZ5v0i_QYa-LcrK1U1VZjZZiJ3d-9hPbMdBbaGoqMds0BAU6w@xxxxxxxxxxxxxx/
>
> >
> > > The new CPPC nominal freq. should always be lower than the initial
> > > ospm_nominal_freq field [1]. So an additional (struct freq_qos_request)
> > > for the nominal (i.e. max_base_freq) frequency might be nice to have
> > > aswell.
> > That sounds like a good enhancement, but I'd prefer to work on that later
> > once the current issues are solved, these are bugs causing some decent
> > damage afterall. But LMK if having that also is quite important at this
> > point.
> >
> > > ------------
> > > Short summary:
> > > The patchset should fix the bugs, but IMO it is still not really clear
> > > which max freq. is stored cpuinfo.max_freq.
> > > I think we would benefit from also:
> > > - adding a cpuinfo.max_boost_freq
> > > - adding a (struct freq_qos_request) for the nominal freq.
> > > - use cpuinfo.max_[base|boost]_freq wherever needed, to simplify
> > >   the .set_boost() callbacks for instance.
> > >
> > > but this might be out of scope if the goal is just to fix the bugs.
> > Thanks a lot for being detailed, Pierre. The direction I have taken for
> > this series is exactly this, sans the additional qos request for the max
> > base freq. As you have pointed out, the current goal is to get at least
> > the bugs fixed. So having the maintainers make a call on what is the
> > direction we want to take in general will be a lot of help. What do you
> > all think, Viresh, Rafael, and Pierre?

Best,
Ananthu