#!/system/bin/sh
#Virtuous OC Startup


/system/xbin/virtuous_oc

#governor tweaks
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ ] ; then
	echo "65000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
	echo "93" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
	echo "130" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias
else
	exit 0
fi
# Copyright© 2011 Juwe11

if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
	echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
fi

if [ -e /proc/sys/vm/swappiness ]; then
	echo "50" > /proc/sys/vm/swappiness
fi

if [ -e /proc/sys/vm/vfs_cache_pressure ]; then
	echo "10" > /proc/sys/vm/vfs_cache_pressure
fi

if [ -e /proc/sys/vm/dirty_expire_centisecs ]; then
	echo "500" > /proc/sys/vm/dirty_expire_centisecs
fi

if [ -e /proc/sys/vm/dirty_writeback_centisecs ]; then
	echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
fi

if [ -e /proc/sys/vm/dirty_ratio ]; then
	echo "90" > /proc/sys/vm/dirty_ratio
fi

if [ -e /proc/sys/vm/dirty_background_ratio ]; then
	echo "5" > /proc/sys/vm/dirty_background_ratio	
	
	
fi

if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
    echo "3072" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
fi

