File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ for cpu in /sys/devices/system/cpu/cpu* ; do
14
14
chmod u+w $cpu /cpufreq/scaling_governor
15
15
fi
16
16
for boundary in min max; do
17
- for fact in cpuinfo scaling; do
18
- if [ -f $cpu /cpufreq/${fact} _${boundary} _freq ]; then
19
- chmod u+w $cpu /cpufreq/${fact} _${boundary} _freq
20
- fi
21
- done
17
+ if [ -f $cpu /cpufreq/scaling_${boundary} _freq ]; then
18
+ chmod u+w $cpu /cpufreq/scaling_${boundary} _freq
19
+ fi
22
20
done
23
21
24
22
# Set governor to performance and do not allow changes later on.
@@ -28,12 +26,10 @@ for cpu in /sys/devices/system/cpu/cpu* ; do
28
26
fi
29
27
30
28
# Hardware maximum performance.
31
- for fact in cpuinfo scaling; do
32
- if [ -f $cpu /cpufreq/${fact} _min_freq ] && [ -f $cpu /cpufreq/${fact} _max_freq ]; then
33
- cp $cpu /cpufreq/${fact} _{max,min}_freq
34
- chmod a-w $cpu /cpufreq/scaling_{max,min}_freq
35
- fi
36
- done
29
+ if [ -f $cpu /cpufreq/scaling_min_freq ] && [ -f $cpu /cpufreq/scaling_max_freq ]; then
30
+ cp $cpu /cpufreq/scaling_{max,min}_freq
31
+ chmod a-w $cpu /cpufreq/scaling_{max,min}_freq
32
+ fi
37
33
38
34
# Disable all but one thread on each core.
39
35
core_id=$( cat $cpu /topology/core_id)
You can’t perform that action at this time.
0 commit comments