Re: [PATCH v5 1/6] cpufreq: Remove per-CPU QoS constraint

From: Rafael J. Wysocki

Date: Mon Mar 16 2026 - 15:25:55 EST


On Mon, Mar 16, 2026 at 3:46 PM Pierre Gondois <pierre.gondois@xxxxxxx> wrote:
>
>
> On 3/13/26 09:57, Viresh Kumar wrote:
> > On 25-02-26, 09:49, Pierre Gondois wrote:
> >> policy->max_freq_req represents the maximum allowed frequency as
> >> requested by the policyX/scaling_max_freq sysfs file. This request
> >> applies to all CPUs of the policy. It is not possible to request
> >> a per-CPU maximum frequency.
> >>
> >> Thus, the interaction between the policy boost and scaling_max_freq
> >> settings should be handled by adding a boost specific QoS constraint.
> >> This will be handled in the following patches.
> >>
> >> This patch reverts of:
> >> commit 1608f0230510 ("cpufreq: Fix re-boost issue after hotplugging
> >> a CPU")
> >>
> >> Reviewed-by: Lifeng Zheng <zhenglifeng1@xxxxxxxxxx>
> >> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> >> ---
> >> drivers/cpufreq/cpufreq.c | 4 ----
> >> 1 file changed, 4 deletions(-)
> >>
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> >> index 4472bb1ec83c7..db414c052658b 100644
> >> --- a/drivers/cpufreq/cpufreq.c
> >> +++ b/drivers/cpufreq/cpufreq.c
> >> @@ -1481,10 +1481,6 @@ static int cpufreq_policy_online(struct cpufreq_policy *policy,
> >>
> >> blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
> >> CPUFREQ_CREATE_POLICY, policy);
> >> - } else {
> >> - ret = freq_qos_update_request(policy->max_freq_req, policy->max);
> >> - if (ret < 0)
> >> - goto out_destroy_policy;
> >> }
> >>
> >> if (cpufreq_driver->get && has_target()) {
> > Even if this change is required, I don't think this should be applied
> > separately. Just reverting this will get the bug back, which was fixed by
> > commit 1608f0230510. Individual patches shouldn't break kernel (and bisect) as
> > much as possible.
> >
> I could not reproduce the original issue.
>
> At the time of the patch and still now, calls to
> freq_qos_update_request() are checked against negative values.
> The only exception is when using the scaling_max_frequency sysfs
> entry, but this is out of the scope.
>
> So I don't see how:
>
> commit 1608f0230510 ("cpufreq: Fix re-boost issue after hotplugging a CPU")
>
> can prevent a CPU to reach the boost frequency. The only path that
> could fail and that I could reproduce was fixed by:
>
> https://lore.kernel.org/all/852ff11c589e6300730d207baac195b2d9d8b95f.1745511526.git.viresh.kumar@xxxxxxxxxx/
>
> So the current conclusion is that "cpufreq: Fix re-boost issue after
> hotplugging a CPU"
> was not the real fix

OK

I gather then that the $subject patch can be applied without the rest
of the series, can't it?

It would be good to update the changelog with all of the relevant
information though.