#!/bin/bash
#
# For CPUs that can throttle themselves up/down,
# it is important when you benchmark to pin them down
# to "maximum strength". That's what this scripts
# does. To do the reverse, i.e. to go back to normal,
# load-based throttling. run 'ondemand'.
#
if [ `id -u` -ne 0 ] ; then
    echo As root
    exit 1
fi
for i in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor ; do
    echo performance > $i
done
cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
echo 0 > /proc/sys/kernel/randomize_va_space
