[Galaxy S II Original Android Development] hyperdroid:
Kernel Frequently Asked & Answered Questions (FAAAQ)

Where is the source for building this Kernel?

You can find the source HERE. I love GPL and We should all support Open Source Software and its Developers. Please Note that Open Source doesn't mean all of this magically wrote and patched itself... it takes a lot of our FREE time to do this and would appreciate if you let us know how you've improved the code.If you know what you're doing, you can easily build your own kernel too. *Please let me know if you have any improvements you feel should be included and send me a pull request. *If it tests okay, it may be included in the next release.

Does the RedPill support AOSP/MIUI/CM7 ROMs for i9100?

As of Rev1.3, I will not be working to making it work on AOSP/MIUI/CM7 as I only have enough time to test and maintain 1 build. When the ICS sources come out, I may have to make it support it again as the team may release an AOSP based ICS as well.

Why doesn’t the RedPill have high benchmarks?*

That’s done on purpose to keep YOU away. Seriously. The way the VM system is tweaked (dirty ratio’s, minfree values, etc.) + the focus on better throughput in any type of load + prioritizing data integrity by turning on fsync + a lot of other small tweaks all lead to good performance and battery drain in actual use (I like using my device and not keep it sleeping to bloat my battery stats, thank you). This

may not give you the benchmark scores you want to be able to show off

… which is good since it means YOU stay away from this kernel and continue to rely on benchmarks rather than actual usage.

Does the RedPill support other variants of the i9100 (like i9100g or i777)?

No. It supports only the i9100 International Version. *If you use it successfully on other i9100 variants, please let me know so I can update this page.

Is the Kernel Undervolted by default?

ARM Voltages are stock. Int Voltages and Busfreq Voltages are conservatively UV'd as seen in the source below...

CPU: L0=1500, L7=100

.index = L0,
.arm_volt = 1450000,
.int_volt = 1100000,

.index = L1,
.arm_volt = 1300000,
.int_volt = 1100000,

.index = L2,
.arm_volt = 1300000,
.int_volt = 1050000,

.index = L3,
.arm_volt = 1200000,
.int_volt = 1050000,

.index = L4,
.arm_volt = 1100000,
.int_volt = 1050000,

.index = L5,
.arm_volt = 1000000,
.int_volt = 975000,

.index = L6,
.arm_volt = 975000,
.int_volt = 950000,

.index = L7,
.arm_volt = 950000,
.int_volt = 925000,

Busfreq:

{LV_0, 400000, 1000000},
{LV_1, 267000, 975000},
{LV_2, 133000, 975000},

Why a tweaked deadline I/O scheduler?

The deadline I/O scheduler by Jens Axboe has proven itself as a low overhead, high throughput and acceptable latency I/O scheduler. *When tweaked for NAND based Mobile devices, it does even better. *While it "starves" writes by default with a 2:1 Read:Write ratio, this can easily be tuned via sysfs.

Why is my favorite governor (whichever it is) not available?

Simplicity is the Ultimate Sophistication, as Leonardo Da Vinci eloquently said. *Based on extensive testing and user feedback, we gathered that these 4 governors included gave the best performance and battery life on our device. Simple choice to have only the best ones available based on actual testing and feedback. *You will also note that I removed lulzactive and any interactive based governor. This was done after I realized that I was tweaking lulzactive, for example, to behave like governors that do the job perfectly already sans the sleep profile. *What I mean is setting a pump up step of 4 and tweaking other factors such as sampling rate and sample time along with cpu_load (inc and dec) made it behave like ondemand with a sleep profile... *I like it simple so I just included the tweaked and optimized ondemand with sleep profile instead. *You can also make lulz behave like conservative, so I included conservative in there. lulzactive is a tweakers dream... but those who like to keep it simple may find it takes time to configure correctly. *I included only these governors so you all have a simple choice to make in finding your favorite one. *These are all tunable via sysfs so you can skew it towards battery or performance based on what is important for you. *Don't expect uber smoothness and 6 hours screen-on time though... *there will be compromises when leaning towards any of the two factors most users consider important in a kernel.

What are the sleepy and hyper governors?**Experimental CPU Governors

(In order to keep all bugs properly attributed to my experiments and not the original author's, I have renamed it accordingly.)

sleepy (formerly know as solo) is an attempt to balance performance and battery life. Its based on the tweaked ondemand by arighi and is optimized for the SGS2. It includes imoseyon's ondemandx tweaks with some down_sampling and other features that users can set by echo'ing into sysfs. Sleepy is closer to ondemandx in behavior when in action.

It also features arighi's fast_start and deep_sleep detection features. It also suspends at 500Mhz.

hyper (formerly known as kenobi) is an aggressively smart and smooth tweaked and optimized for the SGS2 based on ondemand as tweaked by arighi with some ondemandx suspend features from imoseyon. (Added setting suspend_freq via sysfs and Imoseyon's Suspend Code) Hyper is closer to ondemand in behavior when in action.

It features arighi's fast_start and deep_sleep detection features. It also suspends at 500Mhz.

What is arighi's deep_sleep detection?

From arighi's description on the*<a title="deep_sleep commit" href="https://github.com/arighi/linux-gt-i9100/commit/719732552357f66b11f8c972575b440a8f97d64b">actual commit here:</a>

deep sleep detection via low-power idle notifier

Implement a deep sleep detection mechanism using a low-power idle*notifier introduced in 9487d11.

A new parameter is provided in the ondemand cpufreq governor and*exported in sysfs:

/sys/devices/system/cpu/cpufreq/ondemand/deep_sleep

The deep sleep detection is implemented using the following heuristic.

When deep sleep detection is enabled (deep_sleep = 1) if we detect that*the previous low-power idle state was more than 4x the sampling rate, it*means that we're probably going to enter to a deep sleep state or we're*just resuming from a deep sleep.

In both cases we completely ignore the cpu activity (considering it to*the minimum load), because probably there's a big chance to get back to*the deep sleep soon. If it happens, with this heuristic, the cpu will*enter the deep sleep state at the minimum frequency, that is good for*saving battery life.

What is arighi's fast_start detection?

From arighi's description on the <a title="fast_start commit" href="https://github.com/arighi/linux-gt-i9100/commit/df47f443192c3806277db6aed257421e33c4036f">actual commit here:</a>

fast start detection via low-power idle notifier

Implement a heuristic to detect interactive usage of the device and*boost the cpu frequency to the max.

A new parameter is provided in the ondemand cpufreq governor and*exported in sysfs:

/sys/devices/system/cpu/cpufreq/ondemand/fast_start

The fast start detection is implemented using the following heuristic.

If in the last 4 samples the cpu never entered in low-power idle state,*probably the cpu is very busy. In this case we jump to the maximum frequency immediately.

Why SLQB? (According to its author, Nick Piggin)*

”SLQB is a slab allocator that focuses on per-CPU scaling, and good performance with order-0 allocations. Fastpaths emphasis is placed on local allocaiton and freeing, but with a secondary goal of good remote freeing (freeing on another CPU from that which allocated).”

Why XZ Compression for the Kernel?

Its about 30% smaller and decompresses at just half the speed of gzip... I decided to use it as we have a lot of ram and raw cpu power that can easily handle the extra load xz compressed kernels

XZ compression is set to compress at -9 instead of the default -6 (since XZ decompresses faster when the archive is larger) delivers more performance since in kernel land you don't need to worry about compressing anything back to XZ, these gains in size were enough of a trade-off instead of using gzip by default. (Technically, gzip compressed kernels and initramfs are faster than any other compression method... but for our device we have a lot of raw CPU power and a lot of RAM) (more here http://tukaani.org/xz/)

Why ARM Topology and sched_mc?*(From linaro.org)

"The sched_mc function adds a power saving awareness to the Linux scheduler which is tuned for performance by default. When sched_mc is enabled, the scheduler tries to gather the running processes in a minimal number of cpus and clusters. This choice of the location of a process is done thanks to the cpu topology function which describes the affinity between cpus."

(more info here: https://wiki.linaro.org/WorkingGroups/PowerManagement/Specs/sched_mc)

Why RCU Fast No HZ?

"This option causes RCU to attempt to accelerate grace periods in order to allow CPUs to enter dynticks-idle state more quickly. On the other hand, this option increases the overhead of the dynticks-idle checking, particularly on systems with large numbers of CPUs." The power savings generated from using this, in my experience, outweigh the additional minimal overhead in checking dynticks-idle."

Why rename some modded CPU governors?

I chose to rename tweaked/edited governors as there may be bugs that I inadvertently add with my experiments and would like all these bugs to be properly documented as being introduced by myself. (Personally, it would be worse for me to introduce a bug in a current mainline CPU Governor with my experiments as I'm still learning about tweaking and making changes at this level... and from how I live my life, experience is the best teacher)

Ondemand, for example, is an old reliable and putting all the features I want in there will change the performance I have come to expect from it. I don't expect ondemand to have a sleep/suspend profile for example. So editing/tweaking/optimizing a governor and renaming is the way forward for me. I want to select "ondemand" and know that it will behave like it does in all my devices... reliably handling the load at the expense of battery life.(smoothness above all)

Where do I report Issues or Get Community Support?

Head over to the <a title="Official Kernel Release Thread" href="http://androidmeda.com/forum/index.php?topic=47.0">Androidmeda Forums Kernel release thread</a> or <a title="XDA Kernel Release Thread" href="http://xdaforums.com/showthread.php?t=1288850">XDA Kernel release thread</a> to get support from fellow RedPill Users. *Make sure you included a dmesg or last_kmsg by following <a title="How To File Useful Bug Reports in Android" href="http://androidmeda.com/forum/index.php/topic,12.0.html">my guide on filing Bug Reports here.</a>

How do I show my appreciation? Can I donate to you?

You can show your appreciation concretely in several ways:

Pressing the "Thanks" Button on XDA

Signing Up to the Androidmeda Forums and Pressing the "Super Thanks" Button there

Report issues politely and completely

Donating any amount is completely up to you. *I look at donations as a "tip" for a job well done, rather than a "wage" or a "bounty" to get things done. *And Tipping is always up to you... the tipper. *I won't stop development if you don't donate, that's for sure, as I do this mainly for myself and my HyperDroid mates to begin with. I make more money running my own business than this hobby so “tips” are not a necessity… it just tells me how many people actually find the work useful enough to say thank you via a financial gesture.

This Kernel will ALWAYS be FREE to Download and USE, even if the time spent making it IS NOT FREE. *That's Open Source. (The time people spend on open source projects could have been used to spend more time with their families, for example. But the Devs commitment to get something done right is almost always tugging at him to Dev just a little bit more) *:)

*I've personally donated to Devs who've done things I would never have been able to figure out at the time they did figure stuff out. *Learning anything new takes time and time, in my book, is more important than money as I can't turn back time, while I can always earn money. SO I donate to Devs who spend their free time making Stuff better and easier for those of us who haven't figured out how to get it done.