Re: [PATCH v2] cpufreq: cppc: Clamp default minimum limit to lowest_nonlinear_perf

From: Rafael J. Wysocki

Date: Fri Mar 06 2026 - 13:17:00 EST


On Fri, Mar 6, 2026 at 4:09 PM Pierre Gondois <pierre.gondois@xxxxxxx> wrote:
>
> Hello Viresh,
>
> There are already quite some people, but please add me aswell.

OK, so is there a consensus about this particular change?

I guess I'll need to take this one if everyone is fine with it because
I have picked up some ACPI CPPC library change that was combined with
cpufre_cppc code.

> On 3/5/26 07:32, Viresh Kumar wrote:
> > Added few more people
> >
> > I think we should updated MAINTAINERS with a list of reviewers or maintainers
> > for the CPPC driver. Who all want to be part of the reviewers list ?
> >
> > On 03-03-26, 20:03, zhangpengjie (A) wrote:
> >> Just a gentle ping on this patch.
> >> Thanks, Pengjie
> >>
> >> On 2/13/2026 6:06 PM, Pengjie Zhang wrote:
> >>> The ACPI spec defines 'lowest_nonlinear_perf' as the threshold for
> >>> linear performance scaling. Performance levels below this threshold
> >>> are typically inefficient and should not be used by default.
> >>>
> >>> Currently, the QoS minimum request is initialized to 0. This defaults
> >>> the performance floor to the absolute "Lowest Performance" state
> >>> instead of "lowest_nonlinear_perf", allowing the CPU to operate in
> >>> an inefficient range unnecessarily.
> >>>
> >>> Signed-off-by: Pengjie Zhang <zhangpengjie2@xxxxxxxxxx>
> >>> ---
> >>> Changes in v2:
> >>> - Renamed the patch subject to better reflect the logic change.
> >>> - Updated the commit log to clarify ACPI spec details.
> >>> Link to v1:https://lore.kernel.org/all/20260116094555.2978887-1-zhangpengjie2@xxxxxxxxxx/
> >>> ---
> >>> drivers/cpufreq/cppc_cpufreq.c | 18 ++++++++++++++++--
> >>> 1 file changed, 16 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
> >>> index 7e8042efedd1..4a3031d9fcf4 100644
> >>> --- a/drivers/cpufreq/cppc_cpufreq.c
> >>> +++ b/drivers/cpufreq/cppc_cpufreq.c
> >>> @@ -333,9 +333,23 @@ static unsigned int cppc_cpufreq_fast_switch(struct cpufreq_policy *policy,
> >>> return target_freq;
> >>> }
> >>> -static int cppc_verify_policy(struct cpufreq_policy_data *policy)
> >>> +static int cppc_verify_policy(struct cpufreq_policy_data *policy_data)
> >>> {
> >>> - cpufreq_verify_within_cpu_limits(policy);
> >>> + if (policy_data->min == FREQ_QOS_MIN_DEFAULT_VALUE) {
> >>> + struct cpufreq_policy *policy __free(put_cpufreq_policy) =
> >>> + cpufreq_cpu_get(policy_data->cpu);
> >>> + struct cppc_cpudata *cpu_data;
> >>> +
> >>> + if (!policy)
> >>> + return -EINVAL;
> >>> +
> >>> + cpu_data = policy->driver_data;
> >>> + policy_data->min = cppc_perf_to_khz(&cpu_data->perf_caps,
> >>> + cpu_data->perf_caps.lowest_nonlinear_perf);
> >>> + }
> >>> +
> >>> + cpufreq_verify_within_cpu_limits(policy_data);
> >>> +
> >>> return 0;
> >>> }