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: <cebac516-37d0-4752-833d-5b8bbd1c187b@amd.com>
Date: Mon, 24 Feb 2025 11:39:21 +0530
From: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
To: Mario Limonciello <superm1@...nel.org>,
 "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 10/19] cpufreq/amd-pstate-ut: Run on all of the correct
 CPUs

On 2/20/2025 2:32 AM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@....com>
> 
> If a CPU is missing a policy or one has been offlined then the unit test
> is skipped for the rest of the CPUs on the system.
> 
> Instead; iterate online CPUs and skip any missing policies to allow
> continuing to test the rest of them.
> 

Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@....com>

> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> v3:
>  * Only check online CPUs
>  * Update commit message
> ---
>  drivers/cpufreq/amd-pstate-ut.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
> index 028527a0019ca..3a541780f374f 100644
> --- a/drivers/cpufreq/amd-pstate-ut.c
> +++ b/drivers/cpufreq/amd-pstate-ut.c
> @@ -116,12 +116,12 @@ static int amd_pstate_ut_check_perf(u32 index)
>  	struct amd_cpudata *cpudata = NULL;
>  	union perf_cached cur_perf;
>  
> -	for_each_possible_cpu(cpu) {
> +	for_each_online_cpu(cpu) {
>  		struct cpufreq_policy *policy __free(put_cpufreq_policy) = NULL;
>  
>  		policy = cpufreq_cpu_get(cpu);
>  		if (!policy)
> -			break;
> +			continue;
>  		cpudata = policy->driver_data;
>  
>  		if (get_shared_mem()) {
> @@ -188,12 +188,12 @@ static int amd_pstate_ut_check_freq(u32 index)
>  	int cpu = 0;
>  	struct amd_cpudata *cpudata = NULL;
>  
> -	for_each_possible_cpu(cpu) {
> +	for_each_online_cpu(cpu) {
>  		struct cpufreq_policy *policy __free(put_cpufreq_policy) = NULL;
>  
>  		policy = cpufreq_cpu_get(cpu);
>  		if (!policy)
> -			break;
> +			continue;
>  		cpudata = policy->driver_data;
>  
>  		if (!((policy->cpuinfo.max_freq >= cpudata->nominal_freq) &&


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ