This is an adaptation of the new CPUfreq interactive governor, backported as module for the 2.6.29 kernel (with Milestone specific defaults).
+ significantly more responsive to ramp cpu up when required (UI interaction)
+ more consistent ramping, existing governors do their cpu load sampling in a workqueue context, the 'interactive' governor does this in a timer context, which gives more consistent cpu load sampling.
+ higher priority for cpu frequency increase, rt_workqueue is used for scaling up, giving the remaining tasks the cpu performance benefit, unlike existing governors which schedule rampup work to occur after your performance starved tasks have completed.
The interactive governor uses nr_running function, which is not exported symbol, therefore the module needs to know the address of this function. The default is taken from the kernel in the 2.36.0/2.38.0 Milestone firmware and its value is
If you are using another kernel, you need to find the nr_running address this way:
busybox grep nr_running /proc/kallsyms
and then to pass it as an insmod parameter:
insmod /system/lib/modules/cpufreq_interactive.ko nr_running_addr=0xc005e35c
The interactive governor activation after insmod can be done this way:
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
The modified source and the compiled module are attached.
NOTE: for the phones that are not bound to the stock kernel due to the signature checking (unlike Milestone), I recommend to add
EXPORT_SYMBOL_GPL(nr_running); to the end of kernel/sched.c and then to use the source from the attached cpufreq_interactive_src_nonstock.zip file. There's no need to hack around the nr_running function address in such case...