Re: [PATCH v2 3/3] cpufreq: Update set_boost callbacks to rely on boost_freq_req

From: Viresh Kumar

Date: Mon Jan 12 2026 - 20:30:45 EST


On 12-01-26, 16:02, Pierre Gondois wrote:
> In:
> cpufreq_set_policy()
> \-cpufreq_driver->verify(&new_data)
>   \-cpufreq_verify_within_cpu_limits()
>
> the requested min/max values are clamped wrt the cpuinfo.[min|max]_freq.
> However this clamping happens after the QoS constraints have been
> aggregated. This means that if a CPU has:
> - min = 100.000 kHz
> - max = 1.000.000 kHz
> - boost = 1.200.000 kHz
>
> With boost enabled, the user requests:
> - scaling_min: 1.100.000
> - scaling_max: 1.200.000
>
> If boost is disabled, we will have:
> policy->min == policy->max == 1.000.000
> without notifying anybody.
>
> Ideally I assume it would be better to prevent the user from disabling
> boost without first asking to update the scaling_[min|max] frequencies,
> or at least detecting this case and have a warning message.

I don't think this is a problem and doesn't really need special care.
It is the user who is disabling the boost feature, its okay to force
set to clamped values.

> Please let me know if you prefer not adding the new qos constraint,
> I ll try harder not to have it if yes.

But even with that (the issue pointed earlier not being a problem), I
think a new constraint for boost does make the code cleaner and easy
to follow.

Rafael ?

--
viresh