linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Perry Yuan <perry.yuan@amd.com>
To: <rafael.j.wysocki@intel.com>, <Mario.Limonciello@amd.com>,
	<Borislav.Petkov@amd.com>, <viresh.kumar@linaro.org>,
	<Ray.Huang@amd.com>, <gautham.shenoy@amd.com>
Cc: <Alexander.Deucher@amd.com>, <Xinmei.Huang@amd.com>,
	<Xiaojian.Du@amd.com>, <Li.Meng@amd.com>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH Resend 0/8] enable x86_energy_perf_policy for AMD CPU
Date: Tue, 30 Jan 2024 13:56:24 +0800	[thread overview]
Message-ID: <cover.1706592301.git.perry.yuan@amd.com> (raw)

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(-)

-- 
2.34.1


             reply	other threads:[~2024-01-30  5:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  5:56 Perry Yuan [this message]
2024-01-30  5:56 ` [PATCH Resend 1/8] tools/power x86_energy_perf_policy: add info show support for AMD Pstate EPP driver Perry Yuan
2024-01-30 20:04   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 2/8] tools/power x86_energy_perf_policy: enable AMD pstate EPP profile switching on MSR based system Perry Yuan
2024-01-30 20:01   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 3/8] tools/power x86_energy_perf_policy: rename get_msr() and put_msr() with intel prefix Perry Yuan
2024-01-30 19:57   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 4/8] tools/power x86_energy_perf_policy: rename get_cpuid_or_exit() " Perry Yuan
2024-01-30 19:56   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 5/8] tools/power x86_energy_perf_policy: add nominal and lowest nonlinear perf values showing support Perry Yuan
2024-01-30 19:56   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 6/8] tools/power x86_energy_perf_policy: remove the invalid feature options for AMD processors Perry Yuan
2024-01-30 19:54   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 7/8] tools/power x86_energy_perf_policy: rename some perf output strings " Perry Yuan
2024-01-30 19:54   ` Mario Limonciello
2024-01-30  5:56 ` [PATCH Resend 8/8] tools/power x86_energy_perf_policy: change intel msr functions to be static Perry Yuan
2024-01-30 19:55   ` Mario Limonciello

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=cover.1706592301.git.perry.yuan@amd.com \
    --to=perry.yuan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Borislav.Petkov@amd.com \
    --cc=Li.Meng@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=Xinmei.Huang@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).