[Nexus 7 Original Development] weedy2887:
[MENTION=2633638]Ziyan[/MENTION] if you think the Google setting are too twitchy maybe my init script will inspire you.

# Governor
echo 2 > /sys/devices/system/cpu/sched_mc_power_savings
echo 80 > /sys/module/cpu_tegra3/parameters/balance_level
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 644 /sys/devices/system/cpu/cpufreq/interactive/*
if [ ! -e /sys/devices/system/cpu/cpufreq/interactive/timer_slack ]; then
# Probably a CM kernel
for cpu in /sys/devices/system/cpu/cpu*/cpufreq; do
echo interactive > $cpu/scaling_governor
echo 204000 > $cpu/scaling_min_freq
echo 1500000 > $cpu/scaling_max_freq
done
# 0.40 seconds: Wait this long before raising speed above hispeed
echo 400000	> /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
# Go to hi speed when CPU load at or above this value
echo 85	> /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 98	> /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
# 760 mhz: Hi speed to bump to from lo speed when load burst
echo 760000	> /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# 0.04 seconds: The minimum amount of time to spend at a frequency before we can ramp down.
echo 40000	> /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# 0.06 seconds: The sample rate of the timer used to increase frequency
echo 60000	> /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Non-zero means indefinite speed boost active
echo 0	> /sys/devices/system/cpu/cpufreq/interactive/boost
echo 0	> /sys/devices/system/cpu/cpufreq/interactive/input_boost
echo 1	> /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
elif [ -e /sys/devices/system/cpu/cpufreq/interactive/timer_slack \
-a -e /sys/devices/system/cpu/cpufreq/interactive/target_loads ]; then
# Probably a third party kernel with updated interactive.
for cpu in /sys/devices/system/cpu/cpu*/cpufreq; do
echo interactive > $cpu/scaling_governor
echo 204000 > $cpu/scaling_min_freq
echo 1300000 > $cpu/scaling_max_freq
done
echo "120000 1100000:220000 1300000:80000"	> /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 0	> /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
# Go to hi speed when CPU load at or above this value
echo 92	> /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# Jump to 640 mhz from a lower speed if cpu usage spikes
echo 640000	> /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# Jump to 475 mhz from a lower speed on input (screen touch)
echo 475000	> /sys/devices/system/cpu/cpufreq/interactive/input_boost_freq
echo 1	> /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
# 0.08 seconds: The minimum amount of time to spend at a frequency before we can ramp down.
echo 60000	> /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
## Don't know how franco changed this
#echo 20	> /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
# CPU load paired with freq. Lower values result in higher CPU speeds.
echo "90 860000:88 1100000:84 1300000:75" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
# 0.06 seconds: The sample rate of the timer used to increase frequency
echo 40000	> /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# 0.20 seconds, Max additional time to wait in idle, beyond timer_rate
echo 100000	> /sys/devices/system/cpu/cpufreq/interactive/timer_slack
# If the max load among other CPUs is higher than up_threshold_any_cpu_load
# and if the highest frequency among the other CPUs is higher than
# up_threshold_any_cpu_freq then do not let the frequency to drop below sync_freq
echo 640000 > /sys/devices/system/cpu/cpufreq/interactive/sync_freq
echo 860000	> /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
echo 85	> /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
echo 533	> /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
fi
chmod 444 /sys/devices/system/cpu/cpufreq/interactive/*

BLOCK_DEVS="/sys/block/mtdblock* /sys/block/mmcblk* \
/sys/devices/platform/sdhci-tegra*/mmc_host/mmc*/mmc*/block/mmcblk* \
/sys/devices/platform/sdhci-tegra*/mmc_host/mmc*/mmc*/block/mmcblk*/mmcblk*"

for i in $BLOCK_DEVS; do
if [ ! -e "$i/queue/scheduler" ]; then continue; fi
echo row	> $i/queue/scheduler || \
echo cfq	> $i/queue/scheduler || \
echo deadline	> $i/queue/scheduler
echo 512	> $i/queue/max_sectors_kb
echo 1	> $i/queue/nomerges
echo 768	> $i/queue/read_ahead_kb
echo 0	> $i/queue/rotational
echo 1	> $i/queue/rq_affinity

scheduler="$(cat $i/queue/scheduler|busybox awk -F"[\]\[]" '{print $2}')"
if [ "$scheduler"x = "cfqx" ]; then
echo 65536	> $i/queue/iosched/back_seek_max
echo 1	> $i/queue/iosched/back_seek_penalty
echo 512	> $i/queue/iosched/fifo_expire_async
echo 64	> $i/queue/iosched/fifo_expire_sync
echo 1	> $i/queue/iosched/group_idle
echo 6	> $i/queue/iosched/quantum
echo 32	> $i/queue/iosched/slice_async
echo 8	> $i/queue/iosched/slice_async_rq
echo 1	> $i/queue/iosched/slice_idle
echo 64	> $i/queue/iosched/slice_sync
elif [ "$scheduler"x = "rowx" ]; then
echo 100	> $i/queue/iosched/hp_read_quantum
echo 75	> $i/queue/iosched/rp_read_quantum
echo 5	> $i/queue/iosched/hp_swrite_quantum
echo 4	> $i/queue/iosched/rp_swrite_quantum
echo 4	> $i/queue/iosched/rp_write_quantum
echo 3	> $i/queue/iosched/lp_read_quantum
echo 12	> $i/queue/iosched/lp_swrite_quantum
[ $(cat $i/queue/iosched/lp_swrite_quantum) != "2" ] && echo 3 > $i/queue/iosched/lp_swrite_quantum
echo 12	> $i/queue/iosched/read_idle
echo 25	> $i/queue/iosched/read_idle_freq
#echo 10000	> $i/queue/iosched/low_starv_limit
#echo 5000	> $i/queue/iosched/reg_starv_limit
elif [ "$scheduler"x = "deadlinex" ]; then
echo 6	> $i/queue/iosched/fifo_batch
echo 1	> $i/queue/iosched/front_merges
echo 384	> $i/queue/iosched/read_expire
echo 2048	> $i/queue/iosched/write_expire
echo 6	> $i/queue/iosched/write_starved
fi
if [ -e $i/queue/iosched/low_latency ]; then
echo 1	> $i/queue/iosched/low_latency
fi
if [ -e $i/queue/nr_requests ]; then
echo 64	> $i/queue/nr_requests
fi
if [ -e $i/queue/add_random ]; then
echo	1	> $i/queue/add_random
fi
done