Re: [PATCH] cpufreq: intel_pstate: Directly use stored ratios for max frequencies

From: Rafael J. Wysocki
Date: Mon Jan 22 2024 - 06:49:58 EST


On Mon, Jan 22, 2024 at 12:35 PM srinivas pandruvada
<srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, 2024-01-22 at 11:53 +0100, Rafael J. Wysocki wrote:
> > On Thursday, January 18, 2024 1:05:13 PM CET Srinivas Pandruvada
> > wrote:
> > > Avoid unnecessary calculation for converting frequency to
> > > performance
> > > ratio by using a scaling factor for the maximum non turbo and turbo
> >
>
> [...]
>
> > ---
> > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > Subject: [PATCH v1] cpufreq: intel_pstate: Refine computation of P-
> > state for given frequency
> >
> > On systems using HWP, if a given frequency is equal to the maximum
> > turbo
> > frequency or the maximum non-turbo frequency, the HWP performance
> > level
> > corresponding to it is already known and can be used directly without
> > any computation.
> >
> > Accordingly, adjust the code to use the known HWP performance levels
> > in
> > the cases mentioned above.
> >
> > This also helps to avoid limiting CPU capacity artificially in some
> > cases when the BIOS produces the HWP_CAP numbers using a different
> > E-core-to-P-core performance scaling factor than expected by the
> > kernel.
> >
> > Fixes: f5c8cf2a4992 ("cpufreq: intel_pstate: hybrid: Use known
> > scaling factor for P-cores")
> > Cc: 6.1+ <stable@xxxxxxxxxxxxxxx> # 6.1+
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > ---
>
> Tested on the system which showed the issue, this patch work fine.

So I'm going to add a Tested-by from you to it or please let me know
if you don't want me to do so.