#!/bin/sh

for CPU in $(ls  /sys/devices/system/cpu/|grep -E "cpu[0-9]+"); do
	[ -e /sys/devices/system/cpu/${CPU}/cpufreq/scaling_governor ] && echo performance > /sys/devices/system/cpu/${CPU}/cpufreq/scaling_governor
done

for controller in $(ls /sys/class/scsi_host/|grep -E "host[0-9]+"); do
	[ -e /sys/class/scsi_host/${controller}/link_power_management_policy ] && echo max_performance > /sys/class/scsi_host/${controller}/link_power_management_policy
done
