mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpupower: Add support for setting EPP via systemd service
@ 2026-02-14 11:12 Jan Kiszka
  2026-02-20 16:19 ` Shuah
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2026-02-14 11:12 UTC (permalink / raw)
  To: Thomas Renninger, Shuah Khan, John B. Wyatt IV, John Kacur
  Cc: linux-kernel, linux-pm

From: Jan Kiszka <jan.kiszka@siemens.com>

Extend the systemd service so that it can be used for tuning the Energy
Performance Preference (EPP) as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 tools/power/cpupower/cpupower-service.conf | 5 +++++
 tools/power/cpupower/cpupower.sh           | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/tools/power/cpupower/cpupower-service.conf b/tools/power/cpupower/cpupower-service.conf
index 02eabe8e3614..abbb46967565 100644
--- a/tools/power/cpupower/cpupower-service.conf
+++ b/tools/power/cpupower/cpupower-service.conf
@@ -30,3 +30,8 @@
 # its policy for the relative importance of performance versus energy savings to
 # the processor. See man CPUPOWER-SET(1) for additional details
 #PERF_BIAS=
+
+# Set the Energy Performance Preference
+# Available options can be read from
+# /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences
+#EPP=
diff --git a/tools/power/cpupower/cpupower.sh b/tools/power/cpupower/cpupower.sh
index a37dd4cfdb2b..6283e8bf275d 100644
--- a/tools/power/cpupower/cpupower.sh
+++ b/tools/power/cpupower/cpupower.sh
@@ -23,4 +23,10 @@ then
     cpupower set -b "$PERF_BIAS" > /dev/null || ESTATUS=1
 fi
 
+# apply Energy Performance Preference
+if test -n "$EPP"
+then
+    cpupower set -e "$EPP" > /dev/null || ESTATUS=1
+fi
+
 exit $ESTATUS
-- 
2.47.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-20 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-14 11:12 [PATCH] cpupower: Add support for setting EPP via systemd service Jan Kiszka
2026-02-20 16:19 ` Shuah
2026-02-20 18:27   ` Jan Kiszka
2026-02-20 18:52     ` Shuah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®