From 65252c18af3c2f4f5e8e525cdd32bd48dfb7aaa5 Mon Sep 17 00:00:00 2001 From: Michael Vasseur Date: Fri, 25 Oct 2024 10:20:21 +0200 Subject: [PATCH] Pin the frequency on clockspeed --- provision-contest/disable-turboboost_ht | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/provision-contest/disable-turboboost_ht b/provision-contest/disable-turboboost_ht index ad00dc28..ce41e815 100755 --- a/provision-contest/disable-turboboost_ht +++ b/provision-contest/disable-turboboost_ht @@ -14,6 +14,11 @@ for cpu in $(ls -1d /sys/devices/system/cpu/cpu* | sort --version-sort) ; do if [ -f $cpu/cpufreq/scaling_governor ]; then chmod u+w $cpu/cpufreq/scaling_governor fi + for boundary in min max; do + if [ -f $cpu/cpufreq/scaling_${boundary}_freq ]; then + chmod u+w $cpu/cpufreq/scaling_${boundary}_freq + fi + done # Set governor to performance and do not allow changes later on. if [ -f $cpu/cpufreq/scaling_governor ]; then @@ -21,6 +26,12 @@ for cpu in $(ls -1d /sys/devices/system/cpu/cpu* | sort --version-sort) ; do chmod a-w $cpu/cpufreq/scaling_governor fi + # Hardware maximum performance. + if [ -f $cpu/cpufreq/scaling_min_freq ] && [ -f $cpu/cpufreq/scaling_max_freq ]; then + cp $cpu/cpufreq/scaling_{max,min}_freq + chmod a-w $cpu/cpufreq/scaling_{max,min}_freq + fi + # Disable all but one thread on each core. Both core_id and physical_package_id are # numbers it must be ensured that for the following examples are seen as distinct: # - core_id=1, physical_package=11