Commit 58d46f29 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

scripts: Add reset option to prep_benchmarks.sh



This undoes what it reasonably can.

Change-Id: I83ff6d652fbf8b717432bef874003987fe87bfc6
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393685


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent d5679450
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -48,4 +48,26 @@ function configure_performance() {
	echo "Done"
}

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