From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 0/3] power: fixes for amd-pstate frequency scaling
Date: Tue, 8 Sep 2026 09:52:31 -0700 [thread overview]
Message-ID: <20260908165447.450006-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20260328193419.106100-1-stephen@networkplumber.org>
The power library does not work with the amd-pstate driver in passive
mode. Initialization fails because the current frequency read from
scaling_setspeed never matches one of the synthesized frequency buckets
exactly, since amd-pstate scales continuously.
The first patch fixes the matching. The second fixes an unrelated bug
found while testing: the sysfs file is buffered, so a frequency the
kernel rejected was reported as success. The third fixes the unit test,
which assumed the nominal frequency sits at a fixed index in the table.
Tested on a Ryzen 9 7945HX booted with amd_pstate=passive and the
cpufreq_userspace governor loaded. power_cpufreq_autotest now passes,
with and without turbo.
v2 - fixed review comment from GPT
- fixed two other bugs found during review/testing.
Stephen Hemminger (3):
power/amd_pstate: fix frequency matching for continuous scaling
power: check for errors when writing frequency
test/power: fix nominal frequency check with amd-pstate
app/test/test_power_cpufreq.c | 5 +-
drivers/power/acpi/acpi_cpufreq.c | 12 ++-
drivers/power/amd_pstate/amd_pstate_cpufreq.c | 89 +++++++++++++------
drivers/power/cppc/cppc_cpufreq.c | 12 ++-
4 files changed, 74 insertions(+), 44 deletions(-)
--
2.53.0
next prev parent reply other threads:[~2026-09-08 16:54 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 ` Stephen Hemminger [this message]
2026-09-08 16:52 ` [PATCH v2 1/3] " 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 ` [PATCH v2 3/3] test/power: fix nominal frequency check with amd-pstate Stephen Hemminger
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-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@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.