2011년 11월 29일 화요일

Lulzactive Governor v2

Lulzactive Governor v2

Author: Tegrak

Based on "interactive" governor
Inspired by erasmux's "smartass" governor (included in Flykernel)

lulzactive control app
https://market.android.com/details?id=com.tegrak.lulzactive

lulzactive governor source
https://github.com/tegrak/lulz-kernel_gt-i9100/tree/master/kernel/drivers/cpufreq

cpu work load >= [inc_cpu_load]%
cpu frequency changes from (Lx) to (Lx - pump_up_step)
up sampling time = 24000us (from smartass governor)
eg )
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=60%, pump_up_step=1
cpu_load = 60%, current frequency = (L2)800 >> frequency = (L1)1000
cpu_load = 60%, current frequency = (L1)1000 >> frequency = (L0)1200

(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=50%, pump_up_step=2
cpu_load = 50%, current frequency = (L2)800 >> frequency = (L0)1200
cpu_load = 50%, current frequency = (L4)200>> frequency = (L2)800

cpu work load < [inc_cpu_load]%
cpu frequency keeps the current value or changes from (Lx) to (Lx + pump_down_step)
down sampling time = 49000us (from smartass governor)
eg )
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
inc_cpu_load=60%, pump_down_step=1
cpu_load = 59%, current frequency = (L2)800 >> frequency = (L3)500
cpu_load = 23%, current frequency = (L1)1000 >> frequency = (L2)800

screen off
cpu frequency is locked at scaling min freqeuncy.
default min freq of Galaxy S II is 200MHz.
you don't need to use "screen off" profile of SetCPU.
eg )
(L0)1200 - (L1)1000 - (L2)800 - (L3)500 - (L4)200
screen_off_min_step=3
(L4)200 ~ (L3)500

screen_off_min_step=1
(L4)200 ~ (L1)1000

Values
Following values are in /sys/devices/system/cpu/cpufreq/lulzactive/

inc_cpu_load: 0~100%, default is 60%
pump_up_step: 0 ~ (frequency_table_size - 2), default is 1
pump_down_step: 0 ~ (frequency_table_size - 2), default is 1
screen_off_min_step: 0 ~ (frequency_table_size - 1), default is (frequency_table_size - 2)
up_sample_time: 10,000 ~ 50,000μs, default is 24,000μs
down_sample_time: 10,000 ~ 100,000μs, default is 49,000μs

debugging
1 = print screen on/off message
2 = print governor start/stop message
4 = print frequency changing
7 = print all above (bitwise or, 1|2|4 = 7, default 1|2 = 3)
echo "7" > /sys/devices/system/cpu/cpufreq/lulzactive/debug_mode
cat /proc/kmsg | busybox grep "lulzactive"

댓글 12개:

  1. will you release the source code for the governor?

    답글삭제
  2. lulzactive v2 source code is here.
    https://github.com/tegrak/lulz-kernel_gt-i9100/blob/master/kernel/drivers/cpufreq/cpufreq_lulzactive.c

    답글삭제
  3. Hi,

    in the controll app you could make the settings a little easier for not so technical guys: Make it consistent for all sliders on the left side write: "Better Battery" and on the right side "Better Performance" this would be easier - at least for me than the description with the lower and higher values


    Best regards,

    dingolino

    답글삭제
  4. @dingolino
    this is good thinking. I thought about this for a while, but it can make it little weird.
    in case of pump_up_step and pump_down_step, they have to use reversed slide bar if I do that you said. confusing @.@
    I'll try to find another way in your intention.
    sorry for my bad English.

    답글삭제
  5. Hi,
    Do you mind to teach me how to compile this governor?i would like to compile it and use on my i9100G..just like to know what is the file format in cpufreq?like this is .c file..is it i need to create those file like "sampling_rate , boost_time_out and others " and what is these file's format?

    Thanks in advanced

    답글삭제
    답글
    1. I just added the source link.
      Please read post again. :)

      삭제
  6. Hi Tegrak,
    I saw the source link..but i not sure need to use which software to compile. Sorry I'm new on building a module or kernel..

    답글삭제
  7. hi tegrak,
    I've saw the "how to build a kernel" on ur source code page.
    Thanks alot :)

    답글삭제
  8. Hi tegrak,

    with this governor is it suppose to keep the frequency at max speed at all times when the screen is on?

    thanks,
    jT

    답글삭제
  9. How does one get this working properly for music. Played around with the setting but no luck.

    Music player uses less than 10% which when screen off causes the music to lag extremely which is quite irritating. Had to switch back to onDemand

    답글삭제
  10. Hello,

    the lulzactive app does not save my settings. After a reboot always the default settings are applied again. Reason ?

    답글삭제
  11. Hi Tegrak,
    I use ur governor source in my I9100G kernel..but the governors doesn't shown in the list..Can u correct my step?
    I just paste ur governor module into the cpufreq and edit the linux/cpufreq.h..

    please advise

    thanks in advanced

    답글삭제