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] [day] [month] [year] [list]
Message-ID: <87h6d6rgtu.fsf@BLR-5CG11610CF.amd.com>
Date: Wed, 3 Jul 2024 14:29:57 +0530
From: Gautham R.Shenoy <gautham.shenoy@....com>
To: Mario Limonciello <mario.limonciello@....com>
CC: Meng Li <li.meng@....com>, Perry Yuan <perry.yuan@....com>, "open list:AMD
 PSTATE DRIVER" <linux-pm@...r.kernel.org>, open list
	<linux-kernel@...r.kernel.org>, Dhananjay Ugwekar
	<Dhananjay.Ugwekar@....com>, Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH 1/2] cpufreq/amd-pstate-ut: Don't check for highest perf
 matching on prefcore

Mario Limonciello <mario.limonciello@....com> writes:

> If a system is using preferred cores the highest perf will be inconsistent
> as it can change from system events.
>
> Skip the checks for it.
>
> Fixes: e571a5e2068e ("cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically")
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>

> ---
>  drivers/cpufreq/amd-pstate-ut.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
> index 66b73c308ce6..b7318669485e 100644
> --- a/drivers/cpufreq/amd-pstate-ut.c
> +++ b/drivers/cpufreq/amd-pstate-ut.c
> @@ -160,14 +160,17 @@ static void amd_pstate_ut_check_perf(u32 index)
>  			lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
>  		}
>  
> -		if ((highest_perf != READ_ONCE(cpudata->highest_perf)) ||
> -			(nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
> +		if (highest_perf != READ_ONCE(cpudata->highest_perf) && !cpudata->hw_prefcore) {
> +			pr_err("%s cpu%d highest=%d %d highest perf doesn't match\n",
> +				__func__, cpu, highest_perf, cpudata->highest_perf);
> +			goto skip_test;
> +		}
> +		if ((nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
>  			(lowest_nonlinear_perf != READ_ONCE(cpudata->lowest_nonlinear_perf)) ||
>  			(lowest_perf != READ_ONCE(cpudata->lowest_perf))) {
>  			amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL;
> -			pr_err("%s cpu%d highest=%d %d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
> -				__func__, cpu, highest_perf, cpudata->highest_perf,
> -				nominal_perf, cpudata->nominal_perf,
> +			pr_err("%s cpu%d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
> +				__func__, cpu, nominal_perf, cpudata->nominal_perf,
>  				lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf,
>  				lowest_perf, cpudata->lowest_perf);
>  			goto skip_test;
> -- 
> 2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ