Skip to content

Commit

Permalink
CPU scaling scripts don't need to be run as root any more
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Jul 27, 2023
1 parent 2182049 commit f1c6345
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
### Fixed

- envs: Overlay constructor spine configuration on top of default config
- tools: CPU scaling scripts don't need to be run as root any more

## [1.3.0] - 2023/07/26

Expand Down
6 changes: 4 additions & 2 deletions tools/cpufreq_ondemand
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -e

for x in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor; do
echo "ondemand" > $x
for cpuid in 0 1 2 3; do
governor="/sys/devices/system/cpu/cpu${cpuid}/cpufreq/scaling_governor"
echo -n "CPUID ${cpuid}: "
echo "ondemand" | sudo tee -a ${governor}
done
6 changes: 4 additions & 2 deletions tools/cpufreq_performance
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -e

for x in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor; do
echo "performance" > $x
for cpuid in 0 1 2 3; do
governor="/sys/devices/system/cpu/cpu${cpuid}/cpufreq/scaling_governor"
echo -n "CPUID ${cpuid}: "
echo "performance" | sudo tee -a ${governor}
done

0 comments on commit f1c6345

Please sign in to comment.