[Thunderbolt Android Development] santod040:
FAQ:

Hopefully this answers some common questions.

I will add to this as kernel changes are made.

On UnSenseROM Jelato, there is a script in /system/etc/init.d called 00_vdd_levels if I recall the name exactly.

It's essentially a text file that should be either deleted, or remove the ## from the name of it so it doesn't run at boot.

Then whatever app is used to control governors and clock speeds will not get reset upon rebooting, whether you use the built in CPU Controls or No Frills, etc,..

On my other roms, the same rule applies, if there is a script in /system/etc/init.d with vdd levels in the name, remove it or rename it.

On NuSenseX ROM you should be careful touching anything in init.d, or you could break your wifi connection.

Soon, I intend to have kernels that will be baked into each rom, and there will be no need to concern oneself with any of this, and it's really nothing of much concern anyhow.

But I think that about covers most cases...

____

GOVERNORS

1) Ondemand:

Default governor in almost all stock kernels.

One main goal of the ondemand governor is to switch to max frequency as soon as there is a CPU activity detected to ensure the responsiveness of the system.

Effectively, it uses the CPU busy time as the answer to "how critical is performance right now" question.

So Ondemand jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is less loaded/apporaching idle.

Even though many of us consider this a reliable governor, it falls short on battery saving and performance on default settings.

One potential reason for ondemand governor being not very power efficient is that the governor decide the next target frequency by instant requirement during sampling interval.

The instant requirement can respond quickly to workload change, but it does not usually reflect workloads real CPU usage requirement in a short enough time and it may cause it to frequently change between highest and lowest frequency.

2) Conservative:

A slower Ondemand which scales up slowly to save battery.

The conservative governor is based on the ondemand governor.

It functions like the Ondemand governor by dynamically adjusting frequencies based on processor utilization.

However, the conservative governor increases and decreases CPU speed more gradually.

Simply put, this governor increases the frequency step by step on CPU load and jumps to lowest frequency on CPU idle.

Conservative governor aims to dynamically adjust the CPU frequency to current utilization, without jumping to max frequency.

The sampling_down_factor value acts as a negative multiplier of sampling_rate to reduce the frequency that the scheduler samples the CPU utilization.

For example, if sampling_rate equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.

3) Interactive:

(currently my recommended governor for best overall battery and performance)

Can be considered a faster ondemand. So - more snappier, less battery!

Interactive is designed for latency-sensitive, interactive workloads.

Instead of sampling at every interval like ondemand, it determines how to scale up when CPU comes out of idle.

The governor has the following advantages:

1) More consistent ramping, because existing governors do their CPU load sampling in a workqueue context, but interactive governor does this in a timer context, which gives more consistent CPU load sampling.

2) Higher priority for CPU frequency increase, thus giving the remaining tasks the CPU performance benefit, unlike existing governors which schedule ramp-up work to occur after your performance starved tasks have completed.

Interactive - It's an intelligent Ondemand because of stability optimizations. Why??

Sampling the CPU load every X ms (like Ondemand) can lead to under-powering the CPU for X ms, leading to dropped frames, stuttering UI, etc.

Instead of sampling the CPU at a specified rate, the interactive governor will check whether to scale the CPU frequency up soon after coming out of idle.

When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks.

If the CPU is very busy between exiting idle and when the timer fires, then we assume the CPU is underpowered and ramp to max frequency.

4) Userspace:

Instead of automatically determining frequencies, lets user set frequencies.

5) Powersave:

Locks max frequency to min frequency.

Can not be used as a screen-on or even screen-off (if scaling min frequency is too low).

6) Performance:

Sets min frequency to max frequency.

Use this while benchmarking!

7) SmartassV2:

Version 2 of the original smartass governor from Erasmux. Another favorite for many a people.

The governor aim for an "ideal frequency", and ramp up more aggressively towards this freq and less aggressive after.

It uses different ideal frequencies for screen on and screen off, namely awake_ideal_freq and sleep_ideal_freq.

This governor scales down CPU very fast (to hit sleep_ideal_freq soon) while screen is off and scales up rapidly to awake_ideal_freq (500 mhz for GS2 by default) when screen is on.

There's no upper limit for frequency while screen is off (unlike Smartass).

So the entire frequency range is available for the governor to use during screen-on and screen-off state.

The motto of this governor is another option for balance between performance and battery.

8) Lulzactive:

Basically interactive governor with added smartass bits and variable (as opposed to fixed amout) frequency scaling, based on currently occuring cpu loads.

Like smartass, it has a sleep profile built-in.

9) Lagfree:

Lagfree is similar to ondemand. Main difference is it's optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree does not skip any frequency step while scaling up or down. Remember that if there's a requirement for sudden burst of power, lagfree can not satisfy that since it has to raise cpu through each higher frequency step from current. Some users report that video playback using lagfree stutters a little.

____

So, Governors can be categorized into 3/4 on a high level:

___

Changelog:

__

062513

Updated 1,516 OC'd Edition!

Added Governors:

LagFree

Lulzactive

SmartassV2

7 more modules built in

062213

Added 1,516 OC'd Edition!

Adjusted cpu frequency tables

Adjusted voltages

Enabled 1,516 MHz Overclock as Default

062113

Powersave governor added for those of you trying to squeeze more out of the battery, or only using the device on wifi.

062013

Interactive governor added for better response time, keyboard reaction, etc,..

​