lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f194be84-de10-4146-ac58-aab256b28443@kernel.org>
Date: Mon, 24 Feb 2025 17:46:27 -0600
From: Mario Limonciello <superm1@...nel.org>
To: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>,
 "Gautham R . Shenoy" <gautham.shenoy@....com>,
 Perry Yuan <perry.yuan@....com>
Cc: "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
 <linux-kernel@...r.kernel.org>,
 "open list:CPU FREQUENCY SCALING FRAMEWORK" <linux-pm@...r.kernel.org>,
 Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH v4 19/19] cpufreq/amd-pstate: Drop
 amd_pstate_epp_cpu_offline()

On 2/24/2025 03:25, Dhananjay Ugwekar wrote:
> On 2/20/2025 2:33 AM, Mario Limonciello wrote:
>> From: Mario Limonciello <mario.limonciello@....com>
>>
>> When the CPU goes offline there is no need to change the CPPC request
>> because the CPU will go into the deepest C-state it supports already.>
>> Actually changing the CPPC request when it goes offline messes up the
>> cached values and can lead to the wrong values being restored when
>> it comes back.
>>
>> Instead if the CPU comes back online let amd_pstate_epp_set_policy()
>> restore it to expected values.
> 
> Small suggestion below, apart from that LGTM
> 
> Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@....com>

Thanks!

> 
>>
>> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
>> ---
>>   drivers/cpufreq/amd-pstate.c | 9 +--------
>>   1 file changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 408e63aff377a..5068778c1542a 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -1610,14 +1610,7 @@ static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
>>   
>>   static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
>>   {
>> -	struct amd_cpudata *cpudata = policy->driver_data;
>> -	union perf_cached perf = READ_ONCE(cpudata->perf);
>> -
>> -	if (cpudata->suspended)
>> -		return 0;
>> -
>> -	return amd_pstate_update_perf(policy, perf.lowest_perf, 0, perf.lowest_perf,
>> -				      AMD_CPPC_EPP_BALANCE_POWERSAVE, false);
>> +	return 0;
> 
> Instead of making it an empty "return 0" function, can we remove this
> callback altogether? Didnt check if there are any constraints against
> removing it.
> 
I originally had tried removing it, but the driver won't be able to 
setup properly unless the callback is setup.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ