Re: [PATCH 1/2] cpufreq/amd-pstate-ut: Handle the inconsistency

From: Dhananjay Ugwekar
Date: Wed Jun 26 2024 - 02:45:40 EST


Hello Gautham,

On 6/26/2024 10:52 AM, Gautham R.Shenoy wrote:
> "Meng, Li (Jassmine)" <Li.Meng@xxxxxxx> writes:
>
> Hello Jassmine,
>
>>
>> Hi Dhananjay:
>> Sorry for the delay.
>>
>> I think the correction to this issue should be in function amd_pstae_init_freq() of file amd-pstate.c.
>> The value of norminal_freq should be consistent with other
>> values(max_freq,min_freq etc.).
>
> Perry wanted nominal_freq to be in MHz since it is not exposed to the
> user via any of the cpufreq sysfs interfaces.
>
> IMO, it woyuld be good to to rename the variables to have their units
> for better readability along with a bunch of other
> cleanups/code deduplication. But can it be done separately ?

Yes that could be part of a separate cleanup patchset.

>
>
>>
>>> -----Original Message-----
>>> From: Ugwekar, Dhananjay <Dhananjay.Ugwekar@xxxxxxx>
>>> Sent: Tuesday, June 25, 2024 9:52 PM
>>> To: rafael@xxxxxxxxxx; viresh.kumar@xxxxxxxxxx; Shenoy, Gautham Ranjal
>>> <gautham.shenoy@xxxxxxx>; Limonciello, Mario
>>> <Mario.Limonciello@xxxxxxx>; Yuan, Perry <Perry.Yuan@xxxxxxx>;
>>> skhan@xxxxxxxxxxxxxxxxxxx; Meng, Li (Jassmine) <Li.Meng@xxxxxxx>;
>>> Huang, Ray <Ray.Huang@xxxxxxx>
>>> Cc: linux-pm@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
>>> Subject: Re: [PATCH 1/2] cpufreq/amd-pstate-ut: Handle the inconsistency
>>>
>>> Minor modification, the commit subject is supposed to be
>>> "cpufreq/amd-pstate-ut: Handle the inconsistency between nominal_freq
>>> and other *_freq units"
>
> How about:
>
> "cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons"

Sure, this seems easier to understand and more concise. Will update in v2.

>
> Otherwise the patch looks good to me.
>
> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>

Thanks for reviewing!

Regards,
Dhananjay

>
> --
> Thanks and Regards
> gautham.
>