summaryrefslogtreecommitdiffstats
path: root/scripts/corebenchrunner/sysfiles/prep_bench
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/corebenchrunner/sysfiles/prep_bench')
-rwxr-xr-xscripts/corebenchrunner/sysfiles/prep_bench12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/corebenchrunner/sysfiles/prep_bench b/scripts/corebenchrunner/sysfiles/prep_bench
new file mode 100755
index 00000000..1a0fed31
--- /dev/null
+++ b/scripts/corebenchrunner/sysfiles/prep_bench
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Prepare cpu0 for benchmarks.
+set -e
+echo 1 > "/sys/devices/system/cpu/intel_pstate/no_turbo"
+echo performance > "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
+cat "/sys/devices/system/cpu/cpu0/topology/thread_siblings_list" | tr , '\n' | while read n
+do
+ if [ "$n" -ne 0 ]
+ then
+ echo 0 > "/sys/devices/system/cpu/cpu$n/online"
+ fi
+done