scripts: Add reset option to prep_benchmarks.sh
This undoes what it reasonably can. Change-Id: I83ff6d652fbf8b717432bef874003987fe87bfc6 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/393685 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
d567945064
commit
58d46f298f
@ -48,4 +48,26 @@ function configure_performance() {
|
|||||||
echo "Done"
|
echo "Done"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_performance
|
function reset_performance() {
|
||||||
|
echo -n "Placing all CPUs in powersave mode..."
|
||||||
|
for governor in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
|
||||||
|
echo -n powersave > $governor
|
||||||
|
done
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
|
if [ -f "/sys/devices/system/cpu/intel_pstate/no_turbo" ]; then
|
||||||
|
echo -n "Enabling Turbo Boost..."
|
||||||
|
echo -n 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
|
||||||
|
echo "Done"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Enabling irqbalance service..."
|
||||||
|
service irqbalance start 2> /dev/null
|
||||||
|
echo "Done"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$1" = "reset" ]; then
|
||||||
|
reset_performance
|
||||||
|
else
|
||||||
|
configure_performance
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user