• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [INFO] Kernel - HAVS/SVS/CFS/BFS/AXI/UVOC (updated 12th Feb 2012)

SUroot

Extreme Android User
May 25, 2010
23,907
5,306
Riddlesden, West Yorkshire, UK
I am asked quite regularly what the difference between HAVS, SVS, CFS, BFS and AXI are.

So here are my answers.

Please note, this is not a full blown FAQ, its just some info to help you make the right decision in your kernel choice. It is very basic and will not be 100% technically correct in order for it to make sense. As I sacrificed technical accuracy for layman's basic info, there is no need to correct technical inaccuracies ;) although if you feel something else is inaccurate or needs elaborating on further, please let me know.

Definitions:


  • CPU - Central Processing Unit


  • Mhz - Clock speed / frequency of the CPU (the higher the value the faster and harder the CPU is working)


  • mV - "Power" in MilliVolts (not really power, but it's easier to explain this way without starting a lecture on electricity)


  • OC - Overclock


  • UV - Under-Volt


  • VDD Values- Voltage Drain Drain Values (Values of mV assigned to a MHz)



SVS - Static Voltage Scaling.
HTC's default Kernel is SVS.


Static Voltage Scaling means every CPU frequency uses a set, predefined amount of "power" to sustain that Frequency. The higher the MHz, the higher the mV, meaning the more power is used.

Essentially, SVS uses a table where frequency x = voltage Y

For example, an SVS Kernel's VDD table may look like this:

Code:
128MHz=950mV
245MHz=975mV
384MHz=1000mV
----------------
998MHz=1300MHz
These are not necessarily accurate VDD levels, some frequencies have been left out.. Some kernels allow you to amend these VDD levels (such as Eviollet's ManU kernels.


HAVS - Hybrid Adaptive Voltage Scaling

HAVS is is not a set VDD value for each frequency. Rather, it uses a range. This means that frequency x = voltage y-z, depending on a 3rd element - Temperature.

The VDD table may look like this:


Code:
128MHz=875-950mV
245MHz=900-975mV
384MHz=950-1000mV
----------------
998MHz=1225-1300MHz
As the range starts lower in HAVS than SVS, under some circumstances, the mV will be lower, giving HAVS the potential to have better battery consumption.


BFS - Brain F**k Scheduler

The scheduler essentially handles CPU resource allocation. It controls how the CPU ramps up in frequency and down again when not needed. The BFS version is generally very snappy (possibly more so than CFS) but is an older scheduler. It is designed to minimise latency on low spec'd machines (desktops generally)

Further details here:

http://en.wikipedia.org/wiki/Brain_****_Scheduler


CFS - Completely Fair Scheduler

This particular scheduler is newer than BFS. It is designed to make the best of High end machines (desktops again). In the early days, CFS seemed much laggier than BFS but now there is not too much in it. I am quite happily running a modern CFS kernel and I don't experience any lag issues.

Further details here:

Completely Fair Scheduler - Wikipedia, the free encyclopedia

Please note, CFS and BFS are Process Schedulers, not to be mixed up with CFQ and BFQ which are I/O Schedulers.

AXI - Advanced eXtensible Interface

AXI is an APB
(Advanced Peripheral Bus).This has its own frequency, which when the CPU is at a certain frequency (128MHz usually), the bus frequency is lowered. Lowering of this frequency in turn can lower the CPU frequency as the CPU utilises the bus. On the ManU kernels, the AXI lowers to 14MHz, whcih means the CPU frequency lowers to 14MHz (In theory).

Undervolting

Pretty much all custom Kernels are undervolted. Some may state they are not, when they actually are. To undervolt means to use a kernel that has lower VDD levels than normal. For us this is compared to the HTC Desire stock kernels (where HTC use very generous VDD levels). The Cyanogen kernel states it is not undervolted, but CM in general may not be but perhaps compared to the HTC desire stock kernel, it is.

Overclocking

Overclocking is the process of using a custom kernel along with Set CPU or built in ROM settings, to set the CPU frequency / clock speed higher than standard. HTC Desire default is 998MHz. Anything higher than this is overclocking.

As many kernels are Undervolted, this typically means that even with a higher clock speed than default, it can still be using the same power as standard (or even lower). Overclocking damage comes into play when the frequency is higher than by design and more power is used (generating more heat). As these kernels are not using more mV, this damage is highly unlikely. If you overclock too much, worst case scenario is your phone becomes unstable and reboots under strain.

I/O Schedulers

All Kernels for android contain I/O schedulers. These determine how the kernel controls disk read/writes.

The main ones you may see in a Kernel are:

CFQ - Completely Fair Queuing

Really simply, a process requests read/write of the disks. The Process has a queue created (along with queues for other processes) and the requests are queued. Each queue is given a time slot for the requests to be actioned. Higher priority porcesses demand larger time slots.

CFQ - Wikipedia, the free encyclopedia


BFQ - Budget Fair Queing

BFQ is based on CFQ heavily. It aims to improve some "unfairness" in the CFQ timeslice allocation, by using "Budgets" of sectors instead.

Obviously BFQ is more infant that CFQ, but general consensus is that BFQ is getting better.

CFQ | KernelTrap
NOOP - No-Operation

Dead simple. Puts everything in a queue and merges read / write requests. NOOP works best with solid state drives (FLASH, NAND etc) because it assumes that the hardware controller (etc) will optimise for performance
Deadline

Best for databases. Each request is given a deadline (500ms for Read, 5s for Write) after which time, the request expires. Deadline uses read and write queues, (read being higher priority) and these deadlines to try to fairly distribute the requests for best performance.

Further reading on I/O Scheduling here:
Linux Io Scheduler - Waikato Linux Users Group

This is a work in progress. Please let me know if something needs elaborating on (although not AXI please ;) )***
 
All Kernels for android contain I/O schedulers. These determine how the kernel controls disk read/writes.
What a great write-up!
I understand somewhat more about how kernels work than I did. But. I'm still clueless about setting I/O schedules.
So...I probably don't need to mess with these settings (Noop, deadline, cfq, bfq)?
I'm using the Juggernaut ROM, rated at 1836MHz. The phone won't run at that frequency w/o crashing, so in one profile (whenever the battery is charging), I have the CPU set at 1784 MHz max and 385MHz min, with the governor set at On Demand.
Just for browsing, downloading apps or music, etc. Nothing too demanding.

I also want to set a profile to have the CPU decrease if the battery reaches a certain temperature.
What would be considered an upper maximum battery temperature?
About 140
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones