Skip to content

Commit

Permalink
Pin the frequency on clockspeed
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vasseur authored and vmcj committed Oct 25, 2024
1 parent ef93e0c commit 840739f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions provision-contest/disable-turboboost_ht
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ 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
echo performance > $cpu/cpufreq/scaling_governor
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
Expand Down

0 comments on commit 840739f

Please sign in to comment.