[AMD Official Use Only - AMD Internal Distribution Only]

Hi,

> -----Original Message-----
> From: Jan Beulich <[email protected]>
> Sent: Thursday, January 9, 2025 7:38 PM
> To: Penny, Zheng <[email protected]>
> Cc: Stabellini, Stefano <[email protected]>; Huang, Ray
> <[email protected]>; Ragiadakou, Xenia <[email protected]>;
> Andryuk, Jason <[email protected]>; Andrew Cooper
> <[email protected]>; Roger Pau MonnĂ© <[email protected]>; Julien
> Grall <[email protected]>; Stefano Stabellini <[email protected]>; xen-
> [email protected]
> Subject: Re: [PATCH v1 09/11] xen/x86: implement EPP support for the AMD
> processors
>
> On 03.12.2024 09:11, Penny Zheng wrote:
> > +
> > +    /* Initial min/max values for CPPC Performance Controls Register */
> > +    max_perf = data->hw.highest_perf;
> > +    min_perf = data->hw.lowest_perf;
> > +
> > +    if ( data->policy == CPUFREQ_POLICY_PERFORMANCE )
> > +        min_perf = max_perf;
>
> Why can't this be done ...
>
> > +    /* CPPC EPP feature require to set zero to the desire perf bit */
> > +    des_perf = 0;
> > +
> > +    if ( data->policy == CPUFREQ_POLICY_PERFORMANCE )
> > +        /* Force the epp value to be zero for performance policy */
> > +        epp = CPPC_ENERGY_PERF_MAX_PERFORMANCE;
>
> ... here as well? And why is there nothing respective for ...

Ack

>
> > +    else if ( data->policy == CPUFREQ_POLICY_POWERSAVE )
> > +        /* Force the epp value to be 0xff for powersave policy */
> > +        epp = CPPC_ENERGY_PERF_MAX_POWERSAVE;
>
> ... this case (e.g. setting max_perf from min_perf)?

If we put max_perf = min_perf = lowest_perf/lowest_nonlinear_perf, then
we are putting core in idle state. That's how we offline the cpu core in Linux
amd pstate epp driver, see 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/amd-pstate.c?h=v6.13#n1643

>
> Jan

Many thanks,
Penny

Reply via email to