mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gautham R.Shenoy <gautham.shenoy@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Meng Li <li.meng@amd.com>, Perry Yuan <perry.yuan@amd.com>,
	"open list:AMD PSTATE DRIVER" <linux-pm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH 1/2] cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore
Date: Wed, 3 Jul 2024 14:29:57 +0530	[thread overview]
Message-ID: <87h6d6rgtu.fsf@BLR-5CG11610CF.amd.com> (raw)
In-Reply-To: <20240702171515.6780-1-mario.limonciello@amd.com>

Mario Limonciello <mario.limonciello@amd.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@amd.com>

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.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

      parent reply	other threads:[~2024-07-03  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 17:15 Mario Limonciello
2024-07-02 17:15 ` [PATCH 2/2] cpufreq/amd-pstate-ut: Don't fail boost test case if CPB isn't supported Mario Limonciello
2024-07-03  8:58   ` Gautham R.Shenoy
2024-07-03  8:59 ` Gautham R.Shenoy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6d6rgtu.fsf@BLR-5CG11610CF.amd.com \
    --to=gautham.shenoy@amd.com \
    --cc=Dhananjay.Ugwekar@amd.com \
    --cc=li.meng@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=perry.yuan@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®