You are here

Interactive governor

This is an adaptation of the new CPUfreq interactive governor, backported as module for the 2.6.29 kernel (with Milestone specific defaults).

From governors.txt:
Advantages:
+ 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 0xc005e35c.

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...

Comments

Compiles for us too.

Evo is on kernel too. But CM might be adapting it for themselves. Did you let them know?

Thanks for the report. I don't suppose that Cyanogen will be interested in "old" kernel stuff but I've sent him a message anyway...

Going to try compiling the nonstock source for the android kernel(s) running on the HD2.

hi, I have two question.

1. after I typed "echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" and I reboot the phone. do I need to re-type the command again?

2. Milestone overclock module was unload when I insmod cpufreq_interative.ko into the kernel. when I typed in the above command, do I still need to load Milestone over clock module after that?

thanks,

The default governor of the Milestone kernel is "ondemand", so you need to switch it after each boot - usually via start-up scripts invoked from mot_boot_mode replacement.
The overclock module and the governor modules are totally independent and they do different things.

Hi nadlabak,

thanks (again) - and for those of you who use the GOT OR and have issues with using this modification, feel free to use my modifications.
http://www.android-hilfe.de/root-hacking-modding-fuer-motorola-milestone...

Cheers
Thyrus

thanks, as I use slightly different start-up script organization than G.O.T, I've been too lazy to provide the scripts for the installation via GOT OR :)

thanks for this stuff!!

I use overclock_stats.ko for cpustat bug and now cpufreq_interactive.ko take the place of cpufreq_conservative.ko.

What do you think can be the correct mpu_opps and freq_table for intercative governor?
this governor use often the lowest and the highest freq...or not?!

ciao!

Works great on my milestone, thanks for your works. :)

Would the following work as a mot_boot_mode for using the interactive governor and OC? (it is based on the one you provided in the conservative page)

insmod /system/lib/modules/overclock12.ko
echo 56 > /proc/overclock/max_vsel
echo 1000000 > /proc/overclock/max_rate
echo "1 750000" > /proc/overclock/freq_table
echo "4 750000000 42" > /proc/overclock/mpu_opps
echo "2 500000" > /proc/overclock/freq_table
echo "3 500000000 30" > /proc/overclock/mpu_opps
echo "3 250000" > /proc/overclock/freq_table
echo "2 250000000 22" > /proc/overclock/mpu_opps
insmod /system/lib/modules/cpufreq_interactive.ko nr_running_addr=0xc005e35c
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

it did work with the original overclock12.ko; however when trying with your patched module it would always reboot the phone when setting the max_vsel or max_rate, no matter the values.

hey buddy, a cuestion? can i apply this module in the new kernel got-froyo?

The version compiled for the new kernel is attached here:
http://android.doshaska.net/sites/android.doshaska.net/files/cpufreq_int...

can I install both interactive and conservative governor on 2.1 milestone?

Sorry about the newbie question, but I've installed cyanogenmod for milestone from this site and I see the different governor options in the UI. Do I need to perform the steps above to use a different b governor or do they come pre-installed and I just select them in the UI?

Thanks!

Hi. I have cyanogen mod 7 on my desire...as this website says..interactive has plenty advantages,and other websites say that the userspace is useless. normally I get 1200 on quadrant at 1.113 ghz..1400with performance 1450with interactive.and 1550 with userspace...and the smoothest performance overall..... so which should I use for everyday use?, if said that userspace is useless and that performance and interactive chew my battery to pieces ..

,

I have got Milestone with Froyo 2.2.1 - kernel 2.6.32.9-gafbfc43. I have downloaded the cpufreq module dedicated for 2.6.32 version. The module loads without any problems but my phone reboots immediately after command: echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor. Any suggestions?

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.