All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Subject: [PATCH v2 3/3] test/power: fix nominal frequency check with amd-pstate
Date: Tue,  8 Sep 2026 09:52:34 -0700	[thread overview]
Message-ID: <20260908165447.450006-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20260908165447.450006-1-stephen@networkplumber.org>

The turbo test checks that the core runs at frequency index 1 after
scaling up with turbo disabled. That index is only nominal for
acpi-cpufreq; amd-pstate spreads its buckets between scaling_min_freq
and scaling_max_freq, putting nominal at index 47 on a Ryzen 9 7945HX.
Use the index reported by rte_power_get_freq() instead.

Fixes: 1ed04d33cf19 ("power: support amd-pstate cpufreq driver")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_power_cpufreq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 08bce4c0d1..1f79b80e6f 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -486,8 +486,9 @@ check_power_turbo(void)
 		return -1;
 	}
 
-	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
+	/* Nominal frequency is not at a fixed index in the table. */
+	ret = check_cur_freq(TEST_POWER_LCORE_ID,
+			rte_power_get_freq(TEST_POWER_LCORE_ID), false);
 	if (ret < 0)
 		return -1;
 
-- 
2.53.0


      parent reply	other threads:[~2026-09-08 16:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 19:34 [PATCH] power/amd_pstate: fix frequency matching for continuous scaling Stephen Hemminger
2026-04-03  4:09 ` Tummala, Sivaprasad
2026-06-10 22:25 ` Thomas Monjalon
2026-09-08 16:52 ` [PATCH v2 0/3] power: fixes for amd-pstate frequency scaling Stephen Hemminger
2026-09-08 16:52   ` [PATCH v2 1/3] power/amd_pstate: fix frequency matching for continuous scaling Stephen Hemminger
2026-09-08 16:52   ` [PATCH v2 2/3] power: check for errors when writing frequency Stephen Hemminger
2026-09-08 16:52   ` Stephen Hemminger [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=20260908165447.450006-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=sivaprasad.tummala@amd.com \
    --cc=stable@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.