#!/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 the 'performance'
# script does. This one does the reverse, going back
# to normal, load-based throttling.
#
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 ondemand > $i
done
cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
