summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2026-02-21 09:21:55 +0300
committerShuah Khan <skhan@linuxfoundation.org>2026-03-03 21:07:06 +0300
commit50ad1a31bed898787e12b73cb5716fe7960cdde4 (patch)
treeda54df92d9905792862b898977f6f13a0231a2c6
parentdff8e3c025862001956b8edb29c1287c9efcd902 (diff)
downloadlinux-50ad1a31bed898787e12b73cb5716fe7960cdde4.tar.xz
cpupower: Add support for setting EPP via systemd service
Extend the systemd service so that it can be used for tuning the Energy Performance Preference (EPP) as well. Available options can be read from /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences. The desired one can then be set in cpupower-service.conf. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r--tools/power/cpupower/cpupower-service.conf5
-rw-r--r--tools/power/cpupower/cpupower.sh6
2 files changed, 11 insertions, 0 deletions
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