Skip to content

power: fixes for amd-pstate frequency scaling

Stephen Hemminger dpdk-dev 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyApplied
  2. v11 patch 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3power/amd_pstate: fix frequency matching for continuous scalingdrivers/power/amd_pstate/amd_pstate_cpufreq.c+63 -280 replies
2/3power: check for errors when writing frequencydrivers/power/acpi/acpi_cpufreq.c drivers/power/amd_pstate/amd_pstate_cpufreq.c drivers/power/cppc/cppc_cpufreq.c+17 -230 replies
3/3test/power: fix nominal frequency check with amd-pstateapp/test/test_power_cpufreq.c+3 -20 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchSivaprasad Tummala
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] power: fixes for amd-pstate frequency scaling

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(-)
Signature · 1 line
2.53.0