CPU Governors, Hotplug drivers and GPU governors Explained Part 4 (Updated 23/12/16)

Does It Help?

  • Yes

    Votes: 10 90.9%
  • No

    Votes: 1 9.1%

  • Total voters
    11

ShivaY

Senior Member
May 22, 2015
110
195
0
Bangalore
CPU Governors, Hotplug drivers and GPU governors Explained Part 4 (Updated 23/12/16)
---------------------------------------------------------------------------------------------------------------


Official XDA thread Of The Contributer: http://forum.xda-developers.com/member.php?u=5811506
Edited By ShivaY: http://forum.xda-developers.com/member.php?u=6704044

Guide Part 1 Link: http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528762
Guide Part 2 Link: http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528766
Guide Part 3 Link :http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528771



Here I've gathered some info for newcomers to the Android world.I've tried to keep it relatively simple. So if you want more info Comment Below

Recommended apps for manipulating kernel values:

1. Kernel Adiutor (Free to change governor and tune variables)
2. Kernel Adiutor-Mod (Free to change governor and tune variables)
3. Compatible kernel managers (e.g Stweaks, Synapse, UKM, etc.)


8. zzmoove

[ PARAMETERS ]
Quote:
sampling_rate_sleep_multiplier -> sampling rate multiplier on early suspend (possible values 1 or 2, default: 2)

up_threshold_sleep -> up threshold on early suspend (possible range from above 'down_threshold_sleep' up to 100, default: 90)

down_threshold_sleep -> down threshold on early suspend (possible range from 11 to 'under up_threshold_sleep', default: 44)

smooth_up -> smooth up scaling when screen is on (possible range from 1 to 100, default: 100)

smooth_up_sleep -> smooth up scaling on early suspend (possible range from 1 to 100, default: 100)

up_threshold_hotplug x -> hotplug threshold for cpu core x (0 disable core, possible range from 'down_threshold' up to 100, default: 68)

down_threshold_hotplug x -> hotplug threshold for cpu core x (possible range from 1 to under 'up_threshold', default: 55)

block_down_multiplier_hotplug x -> block down multiplier for core x

block_up_multiplier_hotplug x -> block up multiplier for core x

sampling_down_max_momentum -> max sampling down factor which should be set by momentum (0 disable momentum, possible range from sampling_down_factor up to MAX_SAMPLING_DOWN_FACTOR, default 0 disabled)

sampling_down_momentum_sensitivity -> how fast the sampling down factor should be switched (possible values from 1 to 500, default 50)

sampling_down_factor -> depending on which mode is active the factor for sampling rate multiplier which influences the whole sampling rate or the value for stock 'down skip' functionality which influences only the down scaling mechanism (possible values are from 1 to MAX_SMPLING_DOWN_FACTOR, default 1 disabled)

freq_limit_sleep-> limit freqency at early suspend (possible values 0 disable limit, 200-1600, default: 0)

freq_limit -> limit freqency at awake (possible values 0 disable limit, 200-1600, default: 0)

scaling_proportional -> if enabled load-proportional frequencies will be calculated in parallel and will be used in decision for next freq step. after a comparison between normal system table step and proportional step the lowest of these two frequencies will be used for next freq step in both directions. (0 to disable, any value above 0 to enable)

scaling_block_temp -> CPU temperature threshold from where governors freq 'holding' should start. if the given temperature (if CPU temp reading is enabled) is reached the frequency used in tunable 'scaling_block_freq' will be forced targeted and scaling stays on this freq till the temperature is under the threshold again. at the same time hotplugging up work is blocked so in this throttling phase offline cores are staying offline even if the hotplug up thresholds are reached (0 to disable, values between 30 and 80 in °C)

scaling_up_block_cycles -> similar to scaling fastdown but here for a slowdown of up scaling

scaling_up_block_freq -> similar to scaling fastdown but here for a slowdown of up scaling

fast_scaling_up -> Number of scaling jumps only for upscaling when screen on (skip 0-4 frequency steps) or 5 to use autoscaling.

fast_scaling_down -> Number of scaling jumps only for downscaling when screen on (skip 0-4 frequency steps) or 5 to use autoscaling.

fast_scaling_sleep_up -> Number of scaling jumps only for upscaling when screen off (skip 0-4 frequency steps) or 5 to use autoscaling.

fast_scaling_sleep_down -> Number of scaling jumps only for downscaling when screen off (skip 0-4 frequency steps) or 5 to use autoscaling.

disable_hotplug -> switch to enable/disable hotplugging (possible values are any value above 0 to disable hotplugging and 0 to enable it, default 0)

auto_adjust_freq_thresholds -> if enabled all freq thresholds used by the governor will be adjusted accordingly to the new scaling max policy. in particular the thresholds will be increased/decreased by the actual changed max freq step if that change will undercut/exceed the actual min/max freq policy it will stop at the max possible frequency step before undercutting/exceeding min/max freq policy (0 to disable, any value above 0 to enable)

early_demand -> switch to enable/disable early demand functionality (possible values 0 disable or 1 enable, default: 0)

grad_up_threshold -> scale up frequency if the load goes up in one step of grad up value (possible range from 1 to 100, default 50) little example for understanding: when the load rises up in one big 50% step then the frequency will be scaled up immediately instead of wating till up_threshold is reached.

early_demand_sleep -> same function as early demand on awake but in addition combined with fast scaling and sampling rate switch and only active at sleep. (possible values 0 disable or 1 enable, default is 1)

grad_up_threshold_sleep -> 2 way functionality: early demand sleep grad up (load gradient) threshold and at the same time load threshold for switching internally (tuneables are staying at set values!) sampling_rate_sleep_multiplier to 2 and fast_scaling to 2 (possible values from 1 to 100, default is 35)

hotplug_block_up_cycles -> (replaces hotplug_block_cycles) slow down up hotplugging by waiting a given amount of cycles before plugging. possible values 0 disable, any values above 0 (default is 0)

hotplug_block_down_cycles -> (replaces hotplug_block_cycles) slow down down hotplugging by waiting a given amount of cycles before plugging. possible values 0 disbale, any values above 0 (default is 0)

hotplug_idle_freq -> freq at which the idle should be active (possible values 0 disable and any possible scaling freq, default is 0)

sampling_rate_current -> read only and shows currently active sampling rate

sampling_rate_idle -> sampling rate which should be used at 'idle times' (possible values are any sampling rate > 'min_sampling_rate', 0 to disable whole function, default is 0)

sampling_rate_idle_delay -> delay in cycles for switching from idle to normal sampling rate and vice versa (possible values are any value and 0 to disable delay, default is 0)

sampling_rate_idle_threshold -> threshold under which idle sampling rate should be active (possible values 1 to 100, 0 to disable function, default is 0)

scaling_block_cycles -> amount of gradients which should be counted (if block threshold is set) and at the same time up scaling should be blocked and after that a forced down scaling should happen (possible values are any value, 0 to disable that function, default is 0)

scaling_block_freq -> frequency at and above the blocking should be active (possible values are any possible scaling freq, 0 to enable blocking permanently at every frequency, default is 0)

scaling_block_threshold -> gradient (min value) of load in both directions (up/down) to count-up cycles (possible value are 1 to 100, 0 to disable gradient counting)

scaling_block_force_down -> multiplier for the maximal amount of forced down scaling cycles (force down cycles = block_cycles * force_down) therefore the forced down scaling duration (possible value are 2 to any value, 0 to disable forced down scaling and use only scaling up blocks)

profile_number -> switches profile (possible value depends on amount of profiles in cpufreq_zzmoove_profiles.h file, please check this file for further details!) 0 = tunable mode, default 0)

scaling_fastdown_freq -> will be enabled once this frequency has been met or exceeded (0 to disable, all possible system frequencies, default is 0)

scaling_fastdown_up_threshold -> once the above frequency threshold has been met, this will become the new up_threshold until we fall below the scaling_fastdown_freq again. (range from over fastdown_down_threshold to 100, default is 95)

scaling_fastdown_down_threshold -> once the above frequency threshold has been met, this will become the new down_threshold until we fall below the scaling_fastdown_freq again. (range from 11 to under fastdown_up_threshold, default is 90)

scaling_responsiveness_freq -> will be enabled once this frequency has been met or exceeded (0 to disable, all possible system frequencies, default is 0)

scaling_responsiveness_up_threshold -> the up_threshold that will take effect if scaling_responsiveness_freq is set (range from 11 to 100, default is 30)

hotplug_engage_freq -> will not bring any cores online until this frequency is met or exceeded
(0 to disable, all possible system frequencies, default is 0)

music_max_freq -> maximum frequency for CPU when governor is on music mode

music_min_cores -> minimum CPU cores used when governor is on music mode

music_min_freq -> minimum frequency for CPU when governor is on music mode

afs_threshold 1,2,3 -> Auto fast scaling for step one to three respectively (range from 1 to 100)

9. Smartmax/Performance May Cry

[ PARAMETERS ]
Quote:
boost_duration - how long you want the governor to boost your CPU in seconds.

down_rate - The minimum amount of time in nsecs to spend at a frequency before we can ramp down. Notice we ignore this when we are above the ideal frequency.

io_is_busy - Consider if IO is busy

max_cpu_load - CPU freq will be increased if measured load > max_cpu_load

min_cpu_load - CPU freq will be decreased if measured load < min_cpu_load

ramp_up_during_boost - should ramp_up steps during boost be possible

ramp_up_step - Frequency delta when ramping up above the ideal frequency. Zero disables and causes to always jump straight to max frequency. When below the ideal freqeuncy we always ramp up to the ideal freq.

Touch_poke_freq - Also known as the touch boost frequency. This is the frequency that you CPU jumps to when touching screen.


Hotplug tunables
--------------------------

Mako Hotplug:

Quote:
load_threshold: system load threshold to decide when online or offline cores from 0 to 100

high_load_counter: counter to filter online/offline calls. The load needs to be above load_threshold X high_load_counter times for the cores to go online otherwise they stay offline

max_load_counter: max number of samples counters allowed to be counted. The higher thevalue the longer it will take the driver to offline cores after a period of high and continuous load

cpufreq_unplug_limit: if the current CPU freq is above this limit don't offline the cores for a couple of extra samples

min_time_cpu_online: minimum time in seconds that a core stays online to avoid too many online/offline calls

int timer: sample timer in seconds. The default value of 1 equals to 10 samples every second. The higher the value the less samples per second it runs

msm_mpdecision/bricked hotplug

Quote:
startdelay = time until mpdecision starts doing it's magic (20000)

delay = time between checks (70)

pause = if something else plugs in the cpu, fall asleep for 10000ms (10 secs)

scroff_single_core = if the screen is off, don't plug in cpu1/2/3. Additionally: Unplug all cpus except cpu0 when screen is turned off (1)

enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!

min_cpus = min cpus to be online, cannot be < 1.

max_cpus = max cpus to be online (if you set it to 2 and min_cpus to 1 you will basically have a dualcore)

idle_freq = a value against that will be checked if a core +/- is requested.

nwns_threshold_x = runqueue threshold, if this is reached cpuX will be hot/unplugged

twts_threshold_x = time threshold, this amount of time must have passed for the related action to be taken (hot/unplug)

AutoSMP


Quote:
max_cpus, min_cpus, scroff_single_core, delay: Look at description above

enabled: Enable/Disable AutoSMP. Y ( for enabled). N (for disabled)

cpufreq_down: Percentage values for downrate limit (range from 0 - 100)

cpufreq_up: Percentage values for uprate limits (range from 0 - 100)

cycle_down: Cycles to wait after the last hotplug event to unplug another core (values 0 1 2 3 4)

cycle_up: Cycles to wait after the last hotplug event to plug another core (values 0 1 2 3 4)

Alucard

(sourced from defconoi's kernel guide)
Quote:
hotplug_sampling_rate:
Sampling Interval, measured in ms. This factor determines how often the governor should poll for CPU usage in terms of frequency and load percentage to make hotplugging decisions. (Default: 30 ms)

hotplug_rate_1_1:
Number of samples to evaluate cpu1 hotplug in. (Default: 1)

hotplug_rate_2_0:
Number of samples to evaluate cpu1 hotplug out. (Default: 5)

hotplug_rate_2_1:
Number of samples to evaluate cpu2 hotplug in. (Default: 2)

hotplug_rate_3_0:
Number of samples to evaluate cpu2 hotplug out. (Default: 5)

hotplug_rate_3_1:
Number of samples to evaluate cpu3 hotplug in. (Default: 2)

hotplug_rate_4_0:
Number of samples to evaluate cpu3 hotplug out. (Default: 5)

hotplug_freq_1_1:
Up threshold frequency to turn second core On, when some other conditions is also met. ie If (minimum frequency greater than or equal to hotplug_freq 1 1) Hotplug IN Second Core. Higher value corresponds to delay in turning on second core.

hotplug_freq_2_0:
Down threshold frequency to turn second core Off, when some other conditions is also met. ie If (maximum frequency less than hotplug_freq 2 0) Hotplug OUT Second Core. Lower value corresponds to delay in turning off second core.

hotplug_freq_2_1:
Up threshold frequency to turn third core On, when some other conditions is also met. ie If (minimum frequency greater than or equal to hotplug_freq 2 1) Hotplug IN Third Core. Higher value corresponds to delay in turning on Third core.

hotplug_freq_3_0:
Down threshold frequency to turn third core Off, when some other conditions is also met. ie If (maximum frequency less than hotplug_freq 3 0) Hotplug OUT Third Core. Lower value corresponds to delay in turning off third core.

hotplug_freq_3_1:
Up threshold frequency to turn fourth core On, when some other conditions is also met. ie If (minimum frequency greater than or equal to hotplug_freq 3 1) Hotplug IN Fourth Core. Higher value corresponds to delay in turning on Fourth core.

hotplug_freq_4_0:
Down threshold frequency to turn fourth core Off, when some other conditions is also met. ie If (maximum frequency less than hotplug_freq 4 0) Hotplug OUT Fourth Core. Lower value corresponds to delay in turning off fourth core.

hotplug_load_1_1:
The CPU load at which governor scales CPU up. Current Load equal or greater than up_load: CPU Hotplug IN. Value corresponding to 101 causes not HOTPLUG IN. (Default: 60%)

hotplug_load_2_0:
The CPU load at which governor scales CPU down. Current Load less than down_load and CPU online greater than 1: CPU Hotplug OUT. Value corresponding to 101 causes immediately HOTPLUG OUT. (Default: 30%)

hotplug_load_2_1:
The CPU load at which governor scales CPU up. Current Load equal or greater than up_load: CPU Hotplug IN. Value corresponding to 101 causes not HOTPLUG IN. (Default: 65%)

hotplug_load_3_0:
The CPU load at which governor scales CPU down. Current Load less than down_load and CPU online greater than 1: CPU Hotplug OUT. Value corresponding to 101 causes immediately HOTPLUG OUT. (Default: 30%)

hotplug_load_3_1:
The CPU load at which governor scales CPU up. Current Load equal or greater than up_load: CPU Hotplug IN. Value corresponding to 101 causes not HOTPLUG IN. (Default: 65%)

hotplug_load_4_0:
The CPU load at which governor scales CPU down. Current Load less than down_load and CPU online greater than 1: CPU Hotplug OUT. Value corresponding to 101 causes immediately HOTPLUG OUT. (Default: 20%)

hotplug_rq_1_1:
Threshold run queue length for second core to turn on. (Default: 100)

hotplug_rq_2_0:
Threshold run queue length for second core to turn off. (Default: 100)

hotplug_rq_2_1:
Threshold run queue length for third core to turn on. (Default: 200)

hotplug_rq_3_0:
Threshold run queue length for third core to turn off. (Default: 200)

hotplug_rq_3_1:
Threshold run queue length for fourth core to turn on. (Default: 300)

hotplug_rq_4_0:
Threshold run queue length for fourth core to turn off. (Default: 300)

maxcoreslimit:
Max CPU's hotplugging limit. (Default: 4)

maxcoreslimit_sleep:
Max CPU's hotplugging limit. (Default: 2)

Guide Part 1 Link: http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528762
Guide Part 2 Link: http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528766
Guide Part 3 Link :http://forum.xda-developers.com/lenovo-a6000/how-to/cpu-governors-hotplug-drivers-gpu-t3528771


Please Press Thanks Button If It Helped . It Will Encourage Me to Work More For You Guys
THANK YOU
:eek::good:
 
Last edited: