Skip to content

enable x86_energy_perf_policy for AMD CPU

Perry Yuan linux-pm lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/28 patches 8 repliesIn review
  2. v1 posting 1/28 patches 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tools/power x86_energy_perf_policy: add info show support for AMD Pstate EPP drivertools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+167 -441 reply
2/8tools/power x86_energy_perf_policy: enable AMD pstate EPP profile switching on MSR based systemtools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+54 -151 reply
3/8tools/power x86_energy_perf_policy: rename get_msr() and put_msr() with intel prefixtools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+16 -161 reply
4/8tools/power x86_energy_perf_policy: rename get_cpuid_or_exit() with intel prefixtools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+6 -61 reply
5/8tools/power x86_energy_perf_policy: add nominal and lowest nonlinear perf values showing supporttools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+11 -21 reply
6/8tools/power x86_energy_perf_policy: remove the invalid feature options for AMD processorstools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+10 -51 reply
7/8tools/power x86_energy_perf_policy: rename some perf output strings for AMD processorstools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+17 -61 reply
8/8tools/power x86_energy_perf_policy: change intel msr functions to be statictools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c+2 -21 reply

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchMario Limonciello
1/8
2/8
3/8
4/8R-b
5/8R-b
6/8R-b
7/8
8/8

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

Read the v1 thread

Cover letter [PATCH Resend 0/8] enable x86_energy_perf_policy for AMD CPU

Hi all,
This patch series introduces support for the x86_energy_perf_policy utility on AMD processors that utilize the CPPC (Collaborative Processor Performance Control) interface for frequency scaling, using the amd_pstate driver module. AMD processors already support various
Energy Performance Preference (EPP) profiles. With this utility, users can now seamlessly switch between these EPP profiles using the provided commands. And check the CPPC capabilities with this tool.
This enhancement aims to improve power efficiency and performance management for AMD processors, providing users with more control over their system's energy-performance behavior.

There are some EPP profile already support by AMD processors, user can switch EPP profile listed below with the utility commands.

User can change EPP profile like this:

$ sudo x86_energy_perf_policy --hwp-epp performance
$ sudo x86_energy_perf_policy --hwp-epp balance-performance
$ sudo x86_energy_perf_policy --hwp-epp balance_power
$ sudo x86_energy_perf_policy --hwp-epp power

0 performance
128 balance_performance (default)
192 balance_power
255 power

It also supports to check CPPC capabilities and change EPP profiles at runtime.

$ sudo x86_energy_perf_policy
cpu0: [AMD HWP_REQ]: lowest 13 highest 166 desired 0 epp 128 window 0x7829a7d0 (80*10^7us) use_pkg 87
cpu0: [AMD HWP_CAP]: low 13 lowest_non 68 nominal 77 highest 166

cpu1: [AMD HWP_REQ]: lowest 13 highest 166 desired 0 epp 128 window 0x7829a7d0 (80*10^7us) use_pkg 87
cpu1: [AMD HWP_CAP]: low 13 lowest_non 68 nominal 77 highest 166

cpu2: [AMD HWP_REQ]: lowest 13 highest 166 desired 0 epp 128 window 0x7829a7d0 (80*10^7us) use_pkg 87
cpu2: [AMD HWP_CAP]: low 13 lowest_non 68 nominal 77 highest 166

cpu3: [AMD HWP_REQ]: lowest 13 highest 166 desired 0 epp 128 window 0x7829a7d0 (80*10^7us) use_pkg 87
cpu3: [AMD HWP_CAP]: low 13 lowest_non 68 nominal 77 highest 166

cpu4: [AMD HWP_REQ]: lowest 13 highest 166 desired 0 epp 128 window 0x7829a7d0 (80*10^7us) use_pkg 87
cpu4: [AMD HWP_CAP]: low 13 lowest_non 68 nominal 77 highest 166

Your feedback and review effort are greatly appreciated!

Perry.

Perry Yuan (8):
tools/power x86_energy_perf_policy: add info show support for AMD
Pstate EPP driver
tools/power x86_energy_perf_policy: enable AMD pstate EPP profile
switching on MSR based system
tools/power x86_energy_perf_policy: rename get_msr() and put_msr()
with intel prefix
tools/power x86_energy_perf_policy: rename get_cpuid_or_exit() with
intel prefix
tools/power x86_energy_perf_policy: add nominal and lowest nonlinear
perf values showing support
tools/power x86_energy_perf_policy: remove the invalid feature options
for AMD processors
tools/power x86_energy_perf_policy: rename some perf output strings
for AMD processors
tools/power x86_energy_perf_policy: change intel msr functions to be
static

 .../x86_energy_perf_policy.c                  | 355 +++++++++++++-----
 1 file changed, 271 insertions(+), 84 deletions(-)
Signature · 1 line
2.34.1