[MOD][KERNEL] Live OC - Nexus S Android Development

We all know Morfic's popular TEUV kernel which features a low maximum frequency of just 880MHz, but still shows an excellent performance. The secret sauce is the increased bus speed of 220MHz compared to the stock frequency of 200MHz. The problem is that every Nexus S behaves differently because of production tolerances for the CPU and not all devices are able to handle this increased bus speed.
Thus it would be nice to have some way for the user to individually adjust the bus speed to match the overclocking capabilities of their device. Unfortunately with TEUV the bus speed has to be defined on compilation time thus the only way would be to release different versions with different bus speeds which, frankly, would be a pain in the ass. So I implemented a way to change the bus speed on-the-fly while the device is running. In contrast to TEUV not only the bus speed for the maximum frequency but for all states is increased by the same percentage (might change this later, especially for the minimum state).
In '/sys/class/misc/liveoc' change the performance by passing a value from 100 to 120 to 'oc_value' (100 = stock performance, 120 = +20% performance; 100 is default). The bus speed and frequencies for all states will be adjusted accordingly.
I am currently running my Nexus with an increased performance +10% using the stock frequencies 100->110, 200->220, 400->440, 800->880 and 1000->1100 and after increasing the voltage for the maximum state by 25mV 30mV everything is working fine without a reboot for 24h now. The battery drain however seems to be pretty high so it might be a good idea to leave the lowest frequency state untouched. Time and your feedback will tell. Seems like the sleep frequency fix also took care of the high battery drain.
Changes to the source: http://www.pastie.org/2634833
BUGFIX:
The sleep frequency is also adjusted according to the selected OC value, so a proper sleep frequency is chosen when the device is suspended.
Bug fix: http://www.pastie.org/2635644
BUGFIX #2:
When OC value is changed, the minimum and maximum frequency limits set by the user are adjusted according to the new frequencies.
Bugfix: http://www.pastie.org/2691219
BUGFIX #3:
Made sure the bus speeds and frequencies are not changed while a frequency change is currently ongoing.
Bugfix: http://www.pastie.org/2710098
BUGFIX #4:
Instead of a spin lock (which leads to problems) we use a mutex to make sure the bus and frequencies are not changed while a frequency change is ongoing.
Bugfix: http://www.pastie.org/2710386
BUGFIX #5:
If no mutex lock can be obtained, an error value is returned to inform the caller that the frequency was not changed.
Bugfix: http://www.pastie.org/2746226
BUGFIX #6:
1. Reverting back to mutex_lock to make sure no important request like enabling/disabling further frequency changes are skipped.
2. The mutex is unlocked before the CPUfreq stats are resetted. With the above modification this seems necessary to avoid lockups when changing the OC value.
3. The frequencies and bus speed are updated only when the selected OC value actually did change.
Bugfix: http://www.pastie.org/2756640
BUGFIX #7:
Maximum OC value increased to 150.
Bugfix: http://www.pastie.org/2768535
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/liveoc
Thanks to Morfic for his help.

What are creative guy…so many useful mod. Great!!
Sent from my NOOB Nexus S with the poor english by using XDA Premium App

Just when I start to think what else can this guy come out with.. lol
Trying it now
Sent from my Nexus S 4G using Tapatalk

Is the liveoc file just included in morfic teuv kernel???
Sent from my NOOB Nexus S with the poor english by using XDA Premium App

kevinngck1 said:
Is the liveoc file just included in morfic teuv kernel???
Sent from my NOOB Nexus S with the poor english by using XDA Premium App
Click to expand...
Click to collapse
Morfic's TEUV kernel was the inspiration for this mod. It is not implemented in any kernel yet.

The first bugfix.
The sleep frequency is also adjusted according to the selected OC value, so a proper sleep frequency is chosen when the device is suspended.
Bug fix: http://www.pastie.org/2635644

Pretty impressive idea and implementation.
Although I don't have this phone (hope to get one soon as it's for a great price here in Portugal), I stumbled upon this thread and I liked it very much. Keep it up!

This is eactly what I want!!!
You're my hero

Ezekeel said:
We all know Morfic's popular TEUV kernel which features a low maximum frequency of just 880MHz, but still shows an excellent performance. The secret sauce is the increased bus speed of 220MHz compared to the stock frequency of 200MHz. The problem is that every Nexus S behaves differently because of production tolerances for the CPU and not all devices are able to handle this increased bus speed.
Thus it would be nice to have some way for the user to individually adjust the bus speed to match the overclocking capabilities of their device. Unfortunately with TEUV the bus speed has to be defined on compilation time thus the only way would be to release different versions with different bus speeds which, frankly, would be a pain in the ass. So I implemented a way to change the bus speed on-the-fly while the device is running. In contrast to TEUV not only the bus speed for the maximum frequency but for all states is increased by the same percentage (might change this later, especially for the minimum state).
In '/sys/class/misc/liveoc' change the performance by passing a value from 100 to 120 to 'oc_value' (100 = stock performance, 120 = +20% performance; 100 is default). The bus speed and frequencies for all states will be adjusted accordingly.
I am currently running my Nexus with an increased performance +10% using the stock frequencies 100->110, 200->220, 400->440, 800->880 and 1000->1100 and after increasing the voltage for the maximum state by 25mV everything is working fine without a reboot for 24h now. The battery drain however seems to be pretty high so it might be a good idea to leave the lowest frequency state untouched. Time and your feedback will tell.
Changes to the source: http://www.pastie.org/2634833
BUGFIX:
The sleep frequency is also adjusted according to the selected OC value, so a proper sleep frequency is chosen when the device is suspended.
Bug fix: http://www.pastie.org/2635644
Thanks to Morfic for his help.
Click to expand...
Click to collapse
very nice.
i wonder why the increased battery drain. are you still getting similar numbers in setcpu's "time in state" as you were with teuv?

My goodness! Ezekeel! You're just that excellent!

Nice idea, although I don't have a nexus S, (thanks @tapatalk for showing me this thread)

Ezekeel said:
Morfic's TEUV kernel was the inspiration for this mod. It is not implemented in any kernel yet.
Click to expand...
Click to collapse
I'll need some time to wedge this in.
Check why the compile fails after adding the failed hunks (looks like possibly missapplied fuzzy hunk)
Aside i would want it to work with each kernel type, be it TEUV, TUV or T12, T13, T144 or T1544
Since that is all layed out as Kconfig options i'll have to check where to apply the code you added to stock source so it will indeed work for all the speeds, kind of as a added bonus to the current speeds.
Then i would have to shoehorn in a voltage control and OCing without voltage control is not a good idea, 1.0GHz has some obvious headroom, but the OC speeds especially will want a nudge on the voltage side if you nudge the bus/cpu/gpu across the board by x%
and with kernel.org up (not android.git.kernel.org (unless we android geeks just totally hammered it)) i would prefer to grab latest samsung source, freshen up all builds, then work on integrating this.
I could see the netarchy layout benefit from this patch as there are no Kconfig #ifdef to deal with (I'm looking at you mathkid ;P lol hah! coo <3)
Just a little timeframe setter to tune the expectations to a realistic level.
Thanks Ezekeel

Thanks to all your kind words.
Seems like the sleep frequency fix also took care of the high battery drain.

Ezekeel said:
Thanks to all your kind words.
Seems like the sleep frequency fix also took care of the high battery drain.
Click to expand...
Click to collapse
Very nice.
Told you those hummingbirds are picky about their sleep freq
Now we know OCing it causes high drain instead of the typical SoD when no high enough clock is available.

Ezekeel said:
Thanks to all your kind words.
Seems like the sleep frequency fix also took care of the high battery drain.
Click to expand...
Click to collapse
imagine that..
a better sleep makes a happier kernel

Dude, ezekeel do you ever sleep or think about anything other than making our phones more powerful? How can so much utility come from one guy and why are you not employed by the government finding new and exciting ways to kill people. Imo you deserve a massive salary with a brain like yours.
Sent from my Nexus S MV from the XDA Premium app.

kenvan19 said:
Dude, ezekeel do you ever sleep or think about anything other than making our phones more powerful? How can so much utility come from one guy and why are you not employed by the government finding new and exciting ways to kill people. Imo you deserve a massive salary with a brain like yours.
Sent from my Nexus S MV from the XDA Premium app.
Click to expand...
Click to collapse
He codes on the job, i think that makes a big difference on the time availability front.

Any news or update?
Seems no kernel has added this mod
Really want to have a try

It 's coming to Matr1x..
Sent from my Nexus S using XDA App

Its here!!! Matr1x 8.5
Sent from my Nexus S using XDA App

Related

[MOD][KERNEL] Snappy - a new CPUfreq governor

*** This project is dead! ***
The CPUfreq governor is responsible for switching between the different CPU frequencies the processor supports. It thus has a critical impact on both the battery runtime as well as the responsiveness of the device.
The two most popular governors which allow a dynamic frequency switching based on the current processor load are 'ondemand' and 'interactive' and I tested both for a few days to compare their performance in different scenarios: While ondemand appears to offer the best battery runtime, the responsiveness is not great which leads to problems during media playback (cracks and stuttering while playing FLACs with stock music app and watching XviD videos with MoboPlayer). On the other hand, with interactive the responsiveness is better, however the frequency scaling appears to be a bit erratic to me and it seems to spend more time in the high frequency states than actually necessary which leads to an increased battery drain. So it seems, both ondemand and interactive each have their own drawbacks and neither one shows a satisfying performance in all scenarios.
Thus I wrote a new governor called 'snappy' based on ondemand implementing the following two improvements: First, instead of using a static sampling rate, the sampling rate is dynamically adjusted depending on the current load; for a uniform load the sampling rate is set to a high value, while for a non-uniform load the time between two samples is decreased. Second, switching to lower frequency states is deferred, which on average allows the CPU to stay in its current state for longer and thus reduces the rate of frequency changes.
The governor can be tuned using three files in the cpufreq sysfs interface 'up_threshold' (default 95), 'down_threshold' (default 40) and 'sampling_rate_max' (default 100000). The current sampling rate is shown in 'sampling_rate_current'.
Changes to the source: http://www.pastie.org/2570142
BUGFIX:
The sampling rate is decreased in 2% steps while it is increased in 1% steps (this should make the sampling rate adjustment more dynamic). Also, the default for the maximum sampling rate is set to 50000.
Bug fix: http://www.pastie.org/2570778
I wrote this governor yesterday and so I did not have much time for testing. Thus your feedback is highly appreciated. Also, I did not play around much with the three parameters - so there is probably much room for improvement.
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
*** This project is dead! ***
nice!
cant wait to try this out
the idea sounds good, i'd like to test it!
have you checked smartass, btw?
Really nice, I hope morfic will implement it in his kernels.
Sent from my Nexus S using XDA App
Sweet I will be watching this.
Sounds cool. Can't wait to be able to try this
Sent from my Nexus S 4G using XDA App
Cool! Nice idea.
Woah sweet.
Maybe this will get people off that "smartass" governor kick everyones been on.
Very nice work man. I particularly like how you make it sound like creating a CPU governor is about as much work as making a grilled cheese haha
igor.tonky said:
the idea sounds good, i'd like to test it!
have you checked smartass, btw?
Click to expand...
Click to collapse
I also checked smartass and it did behave pretty similar to interactive.
kenvan19 said:
Very nice work man. I particularly like how you make it sound like creating a CPU governor is about as much work as making a grilled cheese haha
Click to expand...
Click to collapse
Actually most of the time I have no idea what I am doing. I am just a mad man with a Nexus S.
I made a few adjustments to snappy:
The sampling rate is decreased in 2% steps while it is increased in 1% steps (this should make the sampling rate adjustment more dynamic). Also, the default for the maximum sampling rate is set to 50000.
Bug fix: http://www.pastie.org/2570778
thanks for all your contributions thus far for the NS. looking foward to more of your work!
Is this in essence a conservative governor with a dynamic sampling rate?
morfic said:
Is this in essence a conservative governor with a dynamic sampling rate?
Click to expand...
Click to collapse
No. It still behaves like ondemand when increasing the frequency, i.e. goes to the maximum frequency available. I also thought about that, but I think it makes most sense to keep it this way, because one is on the safe side and will not end up with a frequency which is too low to handle the load because of a bad estimate (which could cause lags) and the frequency will be decreased automatically anyway on the next call. Also, it actually might be better for the battery runtime - keyword race-to-idle.
@Ezekeel: WTF are you doing here mate?!?! You should be working for Google with your innovations. Keep up the good work!
There are also random reboots with ondemand while watching XVID Videos on MoboPlayer or mxVideo Player.
Ezekeel said:
It still behaves like ondemand when increasing the frequency, i.e. goes to the maximum frequency available.
Click to expand...
Click to collapse
um, that's how _interactive_ behaves - jumps to max frequency on load, then samples down.
ondemand goes to next higher frequency, when load is more than up_threshhold.
so yeah, morfic question is correct, and i can't see how you can mix these two.
unless you switch to ondemand logic for uniform load, of course
igor.tonky said:
ondemand goes to next higher frequency, when load is more than up_threshhold.
Click to expand...
Click to collapse
No, that is not correct. When increasing the frequency ondemand always switches to the maximum frequency. Take a look at the source code if you do not believe me.
Smartass is the best imo. Its responsiveness is awesome.
Thank you for sharing it with us, I will take a look as soon as I can. But I write more to thank you for all the other implementations You have already done and I have reviewed more in detail, you are doing a nice work.
KalimochoAz
xmRipper said:
Smartass is the best imo. Its responsiveness is awesome.
Click to expand...
Click to collapse
but useless when you want to use your phone as mp3player ^^
eiabea said:
but useless when you want to use your phone as mp3player ^^
Click to expand...
Click to collapse
amen to that brother

[Kernel-OC-CPU/GPU-CIFS-FROYO] Thrillz: Get your thrillz while they last!

Welcome to the Thrillz kernel for LG Thrill 4G (may be compatible for O3D).
Standard disclaimer: You bork, your phone. I take no liability. K?
Includes OC to 1.2 native (no modules) and 100 MHz frequency.
cifs.ko module built in.
Conservative governor enabled.
init.d support native.
More to come.
V2 update includes:
Insecure boot
persistent root shell in adb
Removed 100 MHz frequency (caused more issues than it was worth)
Trying a 200 MHz frequency.
V3 includes:
Lock 200mhz when sleep (was set at 300, swapped due to removal of 300)
---Working on other improvements, may be a week or two due to cleanup of code and removal of non-4430 chaff---
V4
Updated frequencies (300, 600, 800, 1000, 1300)
Lower cpu voltages.
#Note, seems screen is eating more battery than CPU. Will investigate.#
Plan for V5
More governors, possible UV compatible with Xan's Voltage Control app.
If you have suggestions, ideas, please give me them.
I do plan on more governors (maybe smartass, interactive, ect....) more io schedulers (bfq, ect...) and anything else that comes my way.
Special thanks to those who have gone before me and helped my learn what I have: gtg465x, LinuxBozo, and Entropy512 for everything that I've learned from them in the Infuse 4G forums, Excaliburinhand for encouraging me to start my own kernel, CallMeAria, Urabewe, tylerwagler and gtg465x again for what they've done here before me... and to you for choosing this kernel (I know... Video game cheezy, but it's true. )
Git is below, it is under the wagler kernel git as it was what I forked and am pushing to. I decided it's time to get started with this.
And please remember, thanks button is good as is fueling my insanity. If you look at my Infusion kernels, I do recognize my "Insanity Crew." (and if you want to be kept in obscurity, I respect that as well. )
Good job man, everyday this forum gets better.
...fighting ninjas at night. Talking about this and that.
Work pretty good on o3d l'll check battry life let u know later
Sent from my LG-P925 using XDA App
Thanks! Keep the comments and suggestions coming! (hoping for p920h/p925 GB leak and official GB source for p920, but I'm fully supporting this in the mean time. Forward ho!)
So far this is best kernel for my rom (v10kv4) so far I got best mobile speed 1.6up 5down i never got this speed any rom or kernal before best speed i had before 1.5. &4 from thriller
Sent from my LG-P925 using XDA App
I hate to report that my battery life did not impress me at first but after charging it seems to be doing better. But i was losing about 15% every 3 hrs in idle. No wifi data or anything.
Sent from my LG Thrill 4G...
Good to see you guys pushin' the kernel movement forward, and sharing your work.
Good deal on getting that built in overclocking going as well. I've been running the kernel for the past day. I did notice an issue, though. Maybe it's just my phone... But the 300mhz OPP, is not being utilized.
I've attached some screenshots.
I was planning to mention that, will try to fix. (100-300 bug) on battery life, what governor are you running? I've found better life on conservative or on demand.
my battery life is decent not the best try to calibrating battery will give you a decent battery life
bedwa said:
I was planning to mention that, will try to fix. (100-300 bug) on battery life, what governor are you running? I've found better life on conservative or on demand.
Click to expand...
Click to collapse
Usually I'm in hotplug or performance... My device has no service, so it doesn't see "normal use" like most. Most of the time it just sits and sleeps.
So, what I did yesterday, really because I wanted to see if you guys squashed the random reboots I've notice in my own playing with LG's kernel source... Had a fully charged phone, flashed your kernel, ran a few benchmarks, still had over 90%, and just let it sit in hotplug. got back to checking it out maybe 12 hours later, noticed the drain, checked setcpu, and that explained it for me. My phone normally would be 80% to 90% in 300mhz... But I don't think 100mhz is able to accomplish most tasks, so it's always popping out, even when it should be idle sleeping.
One thing for me is wireless tethering.. The device needs to be able to accomplish this in the background, and 300mhz even on a DroidX is able to accomplish this. 100mhz is a no go, though.
If you find it real difficult to get 300mhz functioning with 100mhz, I'd say chop the 100mhz out for now, and give us a bump, or atleast put out a 'high voltage' 1388000 mV(TI's kernel 3.0 number) top slot version of the kernel... The overclock module still works with your kernel, BTW... So, in combination with the voltage bump, those that are real speed freaks can push toward that 1300mhz mark with stability.
P.S. No random reboots, so that gets a big thumbs up!!!
I'm going to try and keep to 5 freqs, going to see if 200 works. If not 300 will be low end. Wanting to see if 1.4 or 1.5 is possible with proper voltage. (we should reach sgs II performance benches at that level. )
bedwa said:
I'm going to try and keep to 5 freqs, going to see if 200 works. If not 300 will be low end. Wanting to see if 1.4 or 1.5 is possible with proper voltage. (we should reach sgs II performance benches at that level. )
Click to expand...
Click to collapse
hehehe twould be pretty nice to rub in the face of the acclaimed best device..
Running new Kernel now, so far seems to be running smooth, max 1200, min 600 on Performance governor
Trekfan422991 said:
hehehe twould be pretty nice to rub in the face of the acclaimed best device..
Click to expand...
Click to collapse
It would be nice but I have yet to see my Thrill out perform my STOCK SGS2 yet with any kind of tweaking.
I only hope it can be done.
sent from my Stock Samsung Galaxy S II
I think I got an issue. Starts to lagg when typing/texting. Maybe its the governor I used. I tried with both concervative and ondemand. Also hotplig too. Conservative had the least amount of lag but still noticeable. The other 2 were way too laggy. Unusable.
I believe that's due to the 100 MHz freq. I rebuilt later night without it and while I am typing this there is no lag for me. Re-uploading V2.
Anyone flashed this can comment on battery life and any issues?
Haven't had it long enough for battery use, but it made slim doomed speedier.
Sent from my LG-P925 using xda premium
Flashed it. So far no lag. Battery life kinda iffy. But it's a brand new battery. I'll clear the stats and see how battery life is then.
No issues, phone feels really fast, more batt drain though. I like it.
Sent from my LG-P925 using XDA App

Governors and Schedulers, Explained.

Ok guys, this is going to be a long post but I think in the end, it will put a lot of good information to everyone to help them understand kernels a little better. I may not have a machine to be able to develop but I do know quite a bit of stuff lol. Anyway, here's a thread to inform everyone about the different sections of kernels.
First I would like to give some "thanks."
mtmichaelson - for giving us this badass 1.9gHz kernel to play with and for doing soooooo much for development! We are forever in your debt.
droidphile - for teaching me just about everything I know.
*I'm sure there are more people and if I missed you, let me know!*
First, let's start with "governors."
OnDemand:
The default governor in almost all stock kernels. One main goal of the ondemand governor is to switch to max frequency as soon as CPU activity is detected to ensure the responsiveness of the system. Effectively, it uses the CPU busy time as the answer to the "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 decides 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 workload real CPU usage requirement in a longer time and it possibly causes frequent changes between highest and lowest frequency.
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 was equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.
Smartass2:
Version 2 of the original smartass governor from Erasmux. Another favorite for many people. The governor aims for an "ideal frequency", and ramps 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 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 a balance between performance and battery.
Userspace:
Instead of automatically determining frequencies, it lets the user set the frequencies.
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).
Performance:
Sets min frequency as max frequency. Very useful while benchmarking!
Smoothass:
The same as the Smartass “governor” But MUCH more aggressive & across the board this one has a better battery life that is about a third better than stock KERNEL.
Now for the "schedulers."
Noop:
Inserts all the incoming I/O requests to a "First In First Out" queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data (yes, like a flash drive). Advantage here is that flash drives do not require reordering of multiple I/O requests unlike in normal hard drives.
*Advantages*​1. Serves I/O requests with least number of cpu cycles. (Battery friendly?)
2. Best for flash drives since there is no seeking penalty.
3. Good throughput on db systems.
*Disadvantages*​1. Reduction in number of cpu cycles used is proportionate to drop in performance.
Deadline:
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
*Advantages*​1. Nearly a real time scheduler.
2. Excels in reducing latency of any given single I/O.
3. Best scheduler for database access and queries.
4. Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
5. Like noop, a good scheduler for solid state/flash drives.
*Disadvantages*​1. When the system is overloaded, the set of processes that may miss deadline is largely unpredictable.
CFQ:
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process.
*Advantages*​1. Considered to deliver a better balanced i/o performance.
2. Easiest to tune.
3. Excels on multiprocessor systems.
4. Best database system performance after deadline.
*Disadvantages*​1. Some users report that media scanning takes longer to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
2. Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
SIO:
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. SIO is a mix between noop & deadline. No reordering or sorting of requests.
*Advantages*​1. Simple, very very reliable.
2. Minimized starvation of requests.
*Disadvantages*​1. Slow random-read speeds on flash drives, compared to other schedulers.
2. Sequential-read speeds on flash drives also not so good.
============================================================
That's about all I have for now lol. If I can think of anymore stuff to post on here, I'll get it as soon as I get a chance. Thanks for reading!
Reserved for more info!
Thanks!!!
Can you also include information about smoothass?
Missed interactive. Fyi stock gov on this thing. Which is odd and the first time I've ever seen that.
Sent from my Transformer Prime TF201 using xda premium
Haro912 said:
Missed interactive. Fyi stock gov on this thing. Which is odd and the first time I've ever seen that.
Sent from my Transformer Prime TF201 using xda premium
Click to expand...
Click to collapse
Blitzed doesn't have Interactive which is why I left it out. Fyi not the default lol
Sent from my Volted Ice Revo using Tapatalk.
spc_hicks09 said:
Blitzed doesn't have Interactive which is why I left it out. Fyi not the default lol
Sent from my Volted Ice Revo using Tapatalk.
Click to expand...
Click to collapse
By on this thing I was hoping everyone would realize that I was on my Prime at the time. It's the default on there
Haro912 said:
By on this thing I was hoping everyone would realize that I was on my Prime at the time. It's the default on there
Click to expand...
Click to collapse
Oh lol sorry I thought you were talking about the Revo.
Sent from my Volted Ice Revo using Tapatalk.
Thanks for taking the time to explain all of that. I learned a few things.
Sent from my Blitzed supercharged Volted Ice Revo
scyther2333 said:
Thanks!!!
Can you also include information about smoothass?
Click to expand...
Click to collapse
I should be adding stuff about smoothass soon.
Sent from my Volted Ice Revo using Tapatalk.
Excellent thread hicks, thanks for the info!
Sent from my VS910 4G using XDA App
thanks a lot...
don't mean to add more work for you but i think it would be great if you could give an overview of governors and schedulers and how/why they work in android
scyther2333 said:
thanks a lot...
don't mean to add more work for you but i think it would be great if you could give an overview of governors and schedulers and how/why they work in android
Click to expand...
Click to collapse
Lol that's pretty much exactly what this thread is.
I second that
Obsidian_soul said:
Thanks for taking the time to explain all of that. I learned a few things.
Sent from my Blitzed supercharged Volted Ice Revo
Click to expand...
Click to collapse
Thanks from me too... very informative.... and appreciated.
St3vi3
Can we get an explanation of smoothass please? I can't seem to find much with a standard google search, well except for some things I'd rather not mention lol
Thanks hicks
Sent from my VS910 4G using XDA App
OP updated with the "short and sweet" descriptive of "Smoothass."
scyther2333 said:
thanks a lot...
don't mean to add more work for you but i think it would be great if you could give an overview of governors and schedulers and how/why they work in android
Click to expand...
Click to collapse
corypwrs said:
Can we get an explanation of smoothass please? I can't seem to find much with a standard google search, well except for some things I'd rather not mention lol
Thanks hicks
Sent from my VS910 4G using XDA App
Click to expand...
Click to collapse
^ This made me laugh my ass off haha. I just pictured someone sitting at maybe a library or some public computer and innocently trying to find info on the "smoothass" governor hahahahaha!
spc_hicks09 said:
^ This made me laugh my ass off haha. I just pictured someone sitting at maybe a library or some public computer and innocently trying to find info on the "smoothass" governor hahahahaha!
Click to expand...
Click to collapse
I wasn't really thinking about it much until the search results came up. Luckily I was on my laptop at home or else it would've been awkward for me lol
Sent from my VS910 4G using XDA App
Just curious, why does, smartass2 and smoothass only utilize stock cpu speeds?
Sent from LG Revo Gingervolt 2.0, Hack the Planet. Using XDA App
SnoeDogg said:
Just curious, why does, smartass2 and smoothass only utilize stock cpu speeds?
Sent from LG Revo Gingervolt 2.0, Hack the Planet. Using XDA App
Click to expand...
Click to collapse
It doesn't. It uses all speeds that I included.
Sent from my VS910 4G using xda premium
mtmichaelson said:
It doesn't. It uses all speeds that I included.
Sent from my VS910 4G using xda premium
Click to expand...
Click to collapse
+1
Most of the descriptions here are for a stock Gingerbread kernel.
Sent from my Dread Ginger Revo using Tapatalk.
I figured it out. Im using CPU Master and i had to set thru the program and then thru the widget for some reason. Thanks
Sent from LG Revo Gingervolt 2.0, Hack the Planet. Using XDA App

[POLL][Zeus][UV] which is your max uv?

Hi all,
Since Zeus v6.39 it is possible to undervolt our OB's. I am curious till what level you all can undervolt your OB. Please test the maximum undervolt level at least for a day or so before reporting, so we can be reasonably sure it is stable. And to make comparison possible, keep other settings standard please, so CPU 300 - 1000 MHz, DVFS enabled.
Personally my OB is currently running stable @ the -5 voltage level. -7 gave me an SOD while the screen was off within a few hours and @ -6 parts of my wallpaper went black (GPU problem?).
Happy polling!
I vote for -7. When I enable DVFS I have some lag so I disabled it. In 1.5 days of usage battery gone empty. (some surf on Wifi, some calling, playing some games etc.) I played Max Payne without any lags and got no SODs so far.
AFAIK, DVFS is dynamic voltage and frequency scaling and setting contstant voltage level when it is activated is something not suitable for it's nature. So I don't use bot of them at the same time.
i can't really feel the difference.. stock freq, dvfs enabled, smartassv2 and sio.
voltage now on -7 for a few hours but i can't notice any difference.
Didn't see difference in performance which is a good sign and battery life fulfill my needs : DVFS enable, freq 100-1000, UV -7, smartass2 and SIO. Never got any SOD since its release (and using LG lockscreen).
Sent from my LG-P970 using xda premium
My phone is fully stable at -7 (100-1000mhz). Need more undervoltage. Battery life is more important than cpu perfomance (imho).
I_SBerg said:
I vote for -7. When I enable DVFS I have some lag so I disabled it. In 1.5 days of usage battery gone empty. (some surf on Wifi, some calling, playing some games etc.) I played Max Payne without any lags and got no SODs so far.
AFAIK, DVFS is dynamic voltage and frequency scaling and setting contstant voltage level when it is activated is something not suitable for it's nature. So I don't use bot of them at the same time.
Click to expand...
Click to collapse
Where did you get this information about DVFS from? It sounds plausible because of the name, but I cannot find such information in the Zeus thread. A different possibility is that with the voltage tweaks in Zeus you only change the sort of average voltage of the OB and DVFS dynamically adjusts this to the needs of what you are doing. But this is all guessing for me.
Although I feel it might eat some battery (I don't know for sure) I like DVFS on because I feel a heavy game like Angry Birds Space becomes more responsive with it.
-7, 100-1200
On zeus 6.39O stable with -5 300 - 1200 mhz. +5 to -5 gave about the same score in quadrent.
Battery usage is quite good
-6 gives me lag..
Sent from my LG-P970 using xda premium
dflt said:
-7, 100-1200
Click to expand...
Click to collapse
what are you trying to say here?
Verstuurd van mijn LG-P970 met Tapatalk
I have 100-1100mhz and -3 very well battery and good Performance
Sent from my LG-P970 using xda app-developers app
KC Boutiette said:
Where did you get this information about DVFS from? It sounds plausible because of the name, but I cannot find such information in the Zeus thread. A different possibility is that with the voltage tweaks in Zeus you only change the sort of average voltage of the OB and DVFS dynamically adjusts this to the needs of what you are doing. But this is all guessing for me.
Although I feel it might eat some battery (I don't know for sure) I like DVFS on because I feel a heavy game like Angry Birds Space becomes more responsive with it.
Click to expand...
Click to collapse
Searched net. eg: http://www.emo.org.tr/ekler/035226640b6b89f_ek.pdf
I have 100-1350mhz with -7 stable .
-7, 1350
Sent from my LG-P970 using Xparent ICS Tapatalk 2
I_SBerg said:
Searched net. eg: http://www.emo.org.tr/ekler/035226640b6b89f_ek.pdf
Click to expand...
Click to collapse
Hey thanks for the info! That clarifies a lot to me about what they mean with DVFS.
However, I still dont believe setting the voltage level and DVFS dont go well together. To be more precise I dont believe you make the cpu voltage constant by setting the voltage level in Zeus Tweaker. I believe you make the CPU voltage constant by disabling DVFS.
In a different way: setting the voltage level to 0 would be the original 'stock' level right? So why would LG include DVFS on our OB if it would not work?
KC Boutiette said:
Hi all,
Since Zeus v6.39 it is possible to undervolt our OB's. I am curious till what level you all can undervolt your OB. Please test the maximum undervolt level at least for a day or so before reporting, so we can be reasonably sure it is stable. And to make comparison possible, keep other settings standard please, so CPU 300 - 1000 MHz, DVFS enabled.
Personally my OB is currently running stable @ the -5 voltage level. -7 gave me an SOD while the screen was off within a few hours and @ -6 parts of my wallpaper went black (GPU problem?).
Happy polling!
Click to expand...
Click to collapse
Hmmmmmmm.... scratch that -5. My OB was acting funny, could not take a screenshot and all the power toggles in the notifications area were on one screen all of the sudden. Reboot and I am back to -4 now, cant change the poll however, can I?
-3, 100-1100 works well for me, good battery life too :fingers-crossed:
is anybody comparing with the stock settings?
i monitor with battery monitor widget and so far i haven't found any setting that gives a better battery usage then stock setting.

[Kernel] Vindicator [AOE3] [Strict-Aliasing/UberTC/Loop-Nest] [-R3-]

Vindicator Kernel
Intro:
This is the first Samsung kernel I've ever developed. I just started developing on android a few months ago so I'm brand new to this. I don't really consider myself a developer, I'm just good at figuring things out, all credit goes to the real hard workers coming up with original ideas like Franco, Imoseyon, Ktoonsez, etc. I hope you like it and I won't be offended if you hate it. All ideas are welcome and I'll try to help as best I can. If you wish to use this kernel in a rom , feel free! Although I would love it if you let me know just for my own curiosity.​
Goal:​Keep kernel as lean as possible while adding certain, desirable features, upstreaming source, and optimizing for maximum performance and battery life. The default settings should be optimal for a balance of battery and performance without a need to tweak.​
Disclaimer:​If your phone blows up, its not my fault. If your phone somehow gains perpetual battery life, I'll take full responsibility.​
Features:​-AOE3 Source Based
-ONLY TESTED ON TMOBILE VARIANT
-VControl Kernel Control Script(Loosely Based On lkconfig by imoseyon)
-Compiled With Uber ToolChain 4.9
-Compiled With Strict-Aliasing, A53/57 Tweaks, And Loop Nest Optimizations
-Various Other Build Optimizations
-WLAN_RX & WLAN_CTRL Wakelocks Reduced
-Optional GPU OC To 772Mhz
-A53 UnderClockable To 200Mhz, Overclockable To 1.6Ghz
-A57 UnderClockable To 200Mhz, OverClockable To 2.5Ghz
-Slub Allocator Updated To Linux 3.18
-GPU Slightly UnderVolted
-Small CPU Task Packing
-Nvidia Power Efficiency Patches
-GPU Voltage Control
-LED Fade Control
-Deep sleep fix
-Optimized Power Coefficients
-FSync Toggle
-Memory Leak Patches
-Sleep/Suspend Patches
-3X Faster Integer Square Root Operations
-Interactive Wont Scale Up Below 5% Load
-HRTimer Optimizations
-Avoid load Average Moire
-Scheduler Optimizations
-Memcopy and String Optimizations
-Use Compile Time Constants For Jiffies Conversions When Possible(Reduces CPU Overhead)
-Workqueue Updated To Linux 3.18
-Optional Power Efficient Workqueues (Expanded to more modules than normal as well)
-Moto QuickWakeup Driver
-Frandom (Efficient Random Number Generator)
-Cruft Free
-Slimmed Down
-Tons Of Debugging and Tracers Removed
-Many Misc. Optimizations
-FIOPS, CFQ, NOOP & BFQ IO Schedulers
-Tons Of IO Fixes/Performance Boosts
-Voltage Control
-Entropy Optimizations/Tweaks
-Optimized RWSEM
-Many Parts Pulled From Upstream
-Init.D Support
-Installs SU
-Potentially Something I Forgot...
Downloads:
[AFH] Kernel: https://www.androidfilehost.com/?w=files&flid=32684
Credits:
Imoseyon
Ktoonsez
AndreiLux
G.lewarne
Samsung
Flar2
anarkia
hybridmax
Franco
Faux123
Linaro
Code Aurora Foundation
Cl3Kener
Google
Motorola
If I Missed You Lemme Know!​
XDA:DevDB Information
Vindicator Kernel, Kernel for the T-Mobile Samsung Galaxy S6
Contributors
Xileforce
Source Code: https://github.com/XileForce/Vindicator-S6
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: R3
Created 2015-05-30
Last Updated 2015-05-30
Changelog:
R1:
-Initial Release
R2:
-CPU Task Packing For A53 Cores(Read In FAQ)
-Numerous Patches To HMP From Linaro(This controls how and when tasks are moved from big to LITTLE CPUs)
-CPUIdle Improvements
-GPS Fix(Thanks To Glewarne)
-Increase hash table size on futexs for better performance
-Tweaked Interactive Governor Values A Bit
-Additional Compile Time Optimizations
-Fix VControl Set On Boot
-Add Toggle For Task Packing To VControl(Currently Not Working :/ )
R3:
-Updated To Linux 3.10.67(From .61)
-Made binder mutex instead of rtmutex(less stutter)
-Reduce packing limit. (This will load the CPUs less before spreading load. Actually improves battery and performance)
-Some upstream cpuidle improvements
-Reduce preempt latency
-Optimize scheduler modules with maximum compiler optimizations
-Increase AES interleave to 4x(for encrypted people this showed a performance improvement of 37% on an A57 processor which is our Atlas cores)
-Use high priority workqueue for devfreq which is related to the GPU
-Scheduler considers cost of balancing and doesn't overestimate average anymore
-Small micro optimizations
-Improve Low Memory Killer routines patch from neobuddy89
-Add rbtree optimizations to LMK. (Significantly improves LMK performance)
FAQ's
1. What Is VControl And How Do I Use It?:
VControl is a kernel tweaking "app" built into the ramdisk. It is accessed via terminal emulator. To use it simply download terminal emulator, Type "su" without quotes and hit enter. Grant terminal emulator super user permission and then type "VControl" without quotes. Please note that it is case sensitive. This will bring up a text menu and you navigate by simply entering the option number you want and hitting enter. It is currently a WIP. FSync control and Power Efficient Workqueues don't currently set on boot properly More will be added to VControl over time.
2. You Broke My Phone! Fix It!:
It will be quite hard for me to figure out what is going on if you don't provide details and a log of what happened. To get a log use any file manager with root support and navigate to proc/last_kmsg.
3. What Kernel Tweaking App Should I Use?:
To Tweak the kernel, currently the only app that works well is KTweaker. To get KTweaker simply flash ktoonsez kernel which will install the app, then flash this. You will have the app unless you wipe data. You can also use VControl for a limited number of things
4. What Do Power Efficient Workqueues Do?:
Typically when a task is created, it is bound to the cpu it was created on. This is great for performance due to maintaining cache locality. However its not the best for battery life. Power efficient workqueues attempts to schedule tasks on already awake cpus. A quick note about awake and sleeping cpus. A sleeping cpu doesnt mean the cpu is turned off or not hotplugged, nor does this mean it has to be deep sleeping. A core can be online and still be sleeping which means it uses very little power. This is why we are able to run with all 8 cores on all the time. Most of the time the majority of the cpus are sleeping. With power efficient workqueues, jobs will attempt to schedule on awake cpus which means we dont have to wake up the cpus that are sleeping already. This means we lose cache locality so we suffer a small (very small) performance hit but we potentially save noticeable amounts of battery. Enable for battery, disable if you plan on benchmarking or just want the extra power. They are off by default.
5. What Is Strict Aliasing And Why Should I Care?:
One of the big things Linaro does with improving Android's performance is fixing violations of what's known as "the strict aliasing rule." A pointer is said to alias another pointer when they both refer to the same location of memory. This is OK and not an uncommon thing to do. The strict aliasing rule is that pointers of different types should never refer to the same location of memory (aka alias each other). Strict aliasing allows a compiler to make some assumptions when compiling and optimizing code that it otherwise couldn't. It's actually one of the biggest optimizations you can do and it is fairly hard to add which is why most people don't. Here's a nice read up on it http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html#benefits
6. What Does Moto QuickWakeup Do?:
QuickWakeup is a driver developed by motorola which increases battery life when the screen is off. It allows for only the modules which need to be woken up during sleep to wake up, thus conserving power.
7. What does Small CPU Task Packing Mean?:
Task packing Is a process done by the scheduler. What it tries to do is pack all tasks onto as few cores as possible. In this case, it only packs tasks for the low power(small) cores as we want to maintain maximum performance and spread the load out on the bigger cores. The advantage of packing tasks is that if we envision a scenario where there is a 40% load and that FETs spread out across the 4 small CPUs at 10% load each all 4 small CPUs are awake and running at a low frequency. With task packing all 40% would be shoved onto 1 core and the other 3 would sleep. This provides energy savings. However there becomes a point where the frequency required to process the extra tasks becomes high enough that it would use less power to run two cores at half the speed rather than 1 core at a very high speed. In this scenario the scheduler will automatically let tasks spill over onto adjacent CPUs in order to maximize power efficiency. One down side to this is a small performance hit due to having to pull the other cores out of a sleep state in the event of needing immediate power. However I would guess most people couldn't notice a difference.
More will be added as they come up and I think of them.
Annndd one more
Please note that this is only tested on the smg920T model. I have no idea if it will work on others
Works well thank you!
guaneet said:
Works well thank you!
Click to expand...
Click to collapse
Happy to hear that sir! You are the only other person to have tried it so far so that's good news. BTW. Idk what AVS# you are but I'm an 11 and I have stably undervolted by 75 for the A53 cores and 50 for the A57s. Maybe that will help someone.
Xileforce said:
Happy to hear that sir! You are the only other person to have tried it so far so that's good news. BTW. Idk what AVS# you are but I'm an 11 and I have stably undervolted by 75 for the A53 cores and 50 for the A57s. Maybe that will help someone.
Click to expand...
Click to collapse
I like your ideology behind this kernel. Totally reminds me of imosyen nice to see another dev here! I tend to keep my volts as is. I always have problems
Would also like to say that this kernel is best one for my phone so far! Haven't noticed anything but stability. Thanks
guaneet said:
I like your ideology behind this kernel. Totally reminds me of imosyen nice to see another dev here! I tend to keep my volts as is. I always have problems
Click to expand...
Click to collapse
Haha. My first kernel I ever made was for nexus 6 based on his lean kernel so that's what I learned on. In fact I believe I've got almost all the stuff removed that he has removed back on nexus 6 plus even more that I've found. I'm a firm believer that less is very often more. Expect more trimming down in the following builds.
Sent from my SM-G920T using XDA Free mobile app
Xileforce said:
Haha. My first kernel I ever made was for nexus 6 based on his lean kernel so that's what I learned on. In fact I believe I've got almost all the stuff removed that he has removed back on nexus 6 plus even more that I've found. I'm a firm believer that less is very often more. Expect more trimming down in the following builds.
Sent from my SM-G920T using XDA Free mobile app
Click to expand...
Click to collapse
Well now I know I'll be in good hands ?
I've been following him since the note 3 days.
Can't wait to see where you take this project!
guaneet said:
Well now I know I'll be in good hands ?
I've been following him since the note 3 days.
Can't wait to see where to take this protect!
Click to expand...
Click to collapse
Well I hope you like it! I'll leave you alone now lol.
Sent from my SM-G920T using XDA Free mobile app
Downloading and testing now. Not really related, but I was wondering if power save overrides cpu clock/gov/anything else? The reason I ask, is that I typically underclock or undervolt a bit to save some battery but keep in normal high performance state with PS off. But if PS mode does this anyway, I shouldn't bother should I?
Wow, that 3rd post (FAQs) was super-informative!
Sent from my SM-G920T using XDA Free mobile app
Edit: Everything seems to be running perfectly fine so far. Charging up so I can see how the battery life is. I'm currently on OZOP's ROM.
welcome to the lonely S6 kernel devs club!
ive sent you a pm
benjmiester said:
Downloading and testing now. Not really related, but I was wondering if power save overrides cpu clock/gov/anything else? The reason I ask, is that I typically underclock or undervolt a bit to save some battery but keep in normal high performance state with PS off. But if PS mode does this anyway, I shouldn't bother should I?
Wow, that 3rd post (FAQs) was super-informative!
Sent from my SM-G920T using XDA Free mobile app
Edit: Everything seems to be running perfectly fine so far. Charging up so I can see how the battery life is. I'm currently on OZOP's ROM.
Click to expand...
Click to collapse
To be honest I dont know specifically what power save mode does. I've only had the phone for like 6 days. Ik ps limits frame rate and stuff like that so You will save additional power beyond Running in normal mode, but I'm not sure how it affects cores and frequencies currently. This phone is a whole different beast than my nexus 6...I would like to add more, lower frequency steps to save more power. Glad to hear you are liking it so far though! And I plan on adding a configuration guide of sorts in my 4th post with more detail on the controls available . I also plan on getting synapse working properly as that will enable significantly easier kernel tweaking.
Sent from my SM-G920T using XDA Free mobile app
g.lewarne said:
welcome to the lonely S6 kernel devs club!
ive sent you a pm
Click to expand...
Click to collapse
Thank you! Your build script and zip file were a massive help to me. This is completely different from building for a nexus. And I'm not too worried yet the device is little over a month old. I'm hopeful we will see more development start to come. I tried to use your new script setup but I couldn't get it booting for some reason. I'll have to revisit it. I'm sure I didn't something wrong. I'm a Noob.
Sent from my SM-G920T using XDA Free mobile app
Oh em gee! Im switching to tmo!!!!!! Lol j/k...Glad to see you here Xile! If anyone here likes bleeding edge performance and stability, Vindicator is the kernel for you!!!
Custodian said:
Oh em gee! Im switching to tmo!!!!!! Lol j/k...Glad to see you here Xile! If anyone here likes bleeding edge performance and stability, Vindicator is the kernel for you!!!
Click to expand...
Click to collapse
Lol once I wrap my head around all these different variants I'll try and get a build working for the edge. Took me days just to get call audio working
Sent from my SM-G920T using XDA Free mobile app
Xileforce said:
Lol once I wrap my head around all these different variants I'll try and get a build working for the edge. Took me days just to get call audio working
Sent from my SM-G920T using XDA Free mobile app
Click to expand...
Click to collapse
I know there's a unified method that ktoonz and a few others use/developed, reach out to him for assistance! However, just out of curiosity I flashed this baby on top of sac and ram deodexed rom for the s6 edge sprint variation and it works lol....only issue ive noticed so far is the "storage message" keeps popping up.
Custodian said:
I know there's a unified method that ktoonz and a few others use/developed, reach out to him for assistance! However, just out of curiosity I flashed this baby on top of sac and ram deodexed rom for the s6 edge sprint variation and it works lol....only issue ive noticed so far is the "storage message" keeps popping up.
Click to expand...
Click to collapse
O_O that's suprising...ik there's some differences...hmm...well then. And I am going to try and get their method working soon. I tried to get it working earlier and got it compiling correctly but couldn't get it to boot sadly I will revisit it.
Sent from my SM-G920T using XDA Free mobile app
Going to give your kernel a run today and see how it goes! Always love to see more options around here.
I'm curious about the memory leak(s) you say you've patched. I wasn't really aware of any on the kernel side, can you give a bit of explanation here?

Categories

Resources