Skip to content

Commit 50ad1a3

Browse files
jan-kiszkashuahkh
authored andcommitted
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 <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent dff8e3c commit 50ad1a3

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

tools/power/cpupower/cpupower-service.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@
3030
# its policy for the relative importance of performance versus energy savings to
3131
# the processor. See man CPUPOWER-SET(1) for additional details
3232
#PERF_BIAS=
33+
34+
# Set the Energy Performance Preference
35+
# Available options can be read from
36+
# /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences
37+
#EPP=

tools/power/cpupower/cpupower.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ then
2323
cpupower set -b "$PERF_BIAS" > /dev/null || ESTATUS=1
2424
fi
2525

26+
# apply Energy Performance Preference
27+
if test -n "$EPP"
28+
then
29+
cpupower set -e "$EPP" > /dev/null || ESTATUS=1
30+
fi
31+
2632
exit $ESTATUS

0 commit comments

Comments
 (0)