Cpufreq

Tweaks
The default "ondemand" CPU governor settings vary the frequency between 60 and 1008 MHz, which may result in noticeably lowered performance, because at 60 MHz it takes quite a bit of time for the governor to realize that the frequency needs to be increased.

To improve performance, it is suggested to apply the following tweaks (especially if your device is not a battery-based tablet but a "TV box" and is plugged in all the time into AC electricity):


 * 1) !/bin/sh

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 25 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

On sun7i (A20), the default "fantasy" governor seems to keep the speed at 912 MHz while regularly slowing down for unclear reasons. When testing on an A20-based tablet, the ondemand governor seems to work fine after adjusting the settings. As noted above, the default ondemand governor settings result in a laggy system. The settings below decrease the "sampling_rate" parameter. The max speed is to 1008 MHz, which seems to work OK; change it to 912 MHz (912000) if you're conservative. The minimum speed is 336 MHz. You can also change the minimum scaling speed at boot when compiling the kernel (but you can't adjust the other settings).


 * 1) !/bin/sh

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo 336000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo 200000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate