[HTC Droid DNA] crpalmer:
The goal of this kernel is above all stability with the secondary goals of increased performance and increased battery life. I use this phone for several hours a day for work and therefore it must be reliable. I am not focusing on providing a million options for governors, etc. In addition to those main goals of the kernel, I have an additional secondary goal of removing as much HTC code as possible from the kernel.

This is based on the 2.04 kernel source release from HTC with a huge number of modifications. Thanks to faux123, showp, harsh, mdeejay, zarboz and dsb9938 whose kernels I have pulled some commits from.

The unique features of this kernel are:

New init.d scripts to allow some tweaking without needing any 3rd party apps

* See the next post for details.

Replaced HTC's mpdecision with a new custom hot-plug driver that I created:

* This hot-plug driver is more aggressive about bring cores on and off-line to match the load on the system.

* Bringing cores online earlier makes your phone more responsive / smooth.

* Taking cores offline earlier improves battery life.

* It ramps up very quickly on resume to avoid lag.

Replace HTC's thermald with a new custom thermal driver that I created:

* Unlike all other thermal drivers, it uses "trip-points" to let the phone tell the kernel when it is overheating. The other thermal drivers poll every X ms and read the temperature instead.

* By using trip-points, there is 0 battery consumption unless the phone is overheating.

* By using trip-points, there is an instant reaction to temperature changes.

* It's probably nearly impossible to cause thermal shutdown without being in a desert!

Replaced HTC's bluetooth drivers with Code Aurora Forums (CAF) version.

Replaced HTC's lightsensor table with one that is more sensible and that matches what other devices use. If you have custom auto-brightness settings, you'll probably need to tweak them after installing this kernel.

There are many additional changes to boost performance and battery life:

* Linaro -O3 compiled (Linaro 4.8).

* Overclocking from mdeejay's kernel.

* Underclocking to 192MHz.

* I disable tons of HTC debugging crap left enabled and needlessly consuming battery.

* Improvements to the core locking code of the kernel.

* Patches that transform traditional locks into RCU backed data structures.

* CAF version of the ondemand and conservative governors.

* hsic wakelock changes from dsb9938's kernel.

* CAF changes to power management to sleep faster and waste less CPU during suspend.

* Improved code for moving data to/from user-space and manipulating strings within the kernel.

Other features:

* Include all mainline Linux changes to keep up-to-date on bug fixes.

* Voltage control (faux123) to allow user-space under-volting.

* BFQ I/O scheduler.

* CAF lowmemorykiller.

* Force fast charge.

Links

A link to each version is included in the changelog entry. Scroll down to the changelog to download the latest version.

Source (GitHub):

* Kernel source

* Merging of upstream into the stock kernel

* Build tools

Installation Instructions:

If you are S-OFF you can flash the update.zip in recovery.

If you are S-ON, then after you flash the update.zip in recovery then, while still in recovery, you must run

adb pull /tmp/boot.img
<reboot into bootloader>
fastboot flash boot boot.img

Changelog:

Version 2.0.41: August 25, 2013: Linux 3.4.58, HTC colour "enhancement"

* Merged Linux versions 3.4.53 - 3.4.58

* Added the ability to enable / disable the HTC colour enhancement (this lets you see if you like it or not)

Version 2.0.38: July 7, 2013: Linux 3.4.52

* Linux version 3.4.51 / 52 merged in

* Reverted a small change to the PWM values used for the display (it wasn't giving any value so why change ti)

Version 2.0.34: June 24, 2013: colour enhancement, fixes, debug messages

* Toned done yet more HTC debugging messages

* Enable UTF-8 codepage support for Windows file-systems

* Fix error in HTC's light-sensor calibration table (overflows the 16-bit number they are using)

* Avoid buffer overflow in acdb driver

* Remove HTC's colour enhancement gamma correction (beaups)

Version 2.0.32: June 15, 2013: linux 3.4.49, scheduler & mutex improvements

* Linux 3.4.49

* Three scheduler performance improvements

* Move to more standard and slightly faster mutex implementation

Version 2.0.30: June 8, 2013: linux 3.4.48, small fixes

* Linux 3.4.48

* Fix CVE-2013-2595

* Decrease latency in cpufreq frequency changes

Version 2.0.27: May 26, 2013: init.d governor, 3.4.47

* Ability to specify the cpufreq governor at boot time (see second post).

* Linux 3.4.47

* Remove an annoying HTC debugging message

Version 2.0.26: May 23, 2013: init.d tweaks, 3.4.46, no default undervolting

* Added PVS information to /proc/cpuinfo in case you wanted to knoiw what it is for your phone.

* Linux upstream version 3.4.46

* Improve how I set the CPU frequences to safe levels for boot without having to reset them every time a core is hot-plugged in.

* New init.d scripts for some common tweaks (see post #2).

Version 2.0.23: May 13, 2013: Lightsensor fix, 3.4.45, faster freq. changes:

* Fix an error transcribing the lightsensor ranges into the source.

* Update to Linux 3.4.45

* cpufreq: use a high priority to target new frequencies to allow faster changes under load

Version 2.0.20: May 12, 2013: Lightsensor, 3.4.44, undervolt for "fast":

* Use a new lightsensor table to get a more granular light reading If you have custom auto-brightness settings, you'll probably need to tweak them after installing this kernel.

* Update to Linux 3.4.44

* Undervolted for devices binned "fast" by -100mV.

* CAF fix for cpufreq driver.

Version 2.0.17: May 7, 2013: Linaro 4.8.0 build, minor CAF fixes:

* Moved to updated Linaro 4.8.0 based toolchain (theoretically faster, less battery likely it's unnoticeable)

* CAF: change boot-up order for cpufreq

* CAF BT: recover from a hardware error by resetting the device

Version 2.0.15: May 2, 2013: boot hang fix, 3.4.43, CPU frequencies, brightness, misc fixes:

* Linux 3.4.43

* Small fixes from CAF (bluetooth, usb)

* Restore the CPU frequences/voltages from 1.x.y kernels (previously I was using HTC's new tables)

* simple_plug: keep cores online during boot

* use the correct brightness ranges for our display (HTC cut off the lowest brightnesses).

* fix a race condition on boot with the binder kernel services

Version 2.0.9: April 23, 2013: 3.4.41 and small fixes:

* Linux 3.4.41

* Small fixes from CAF

* Clean up some more HTC crap in the kernel

Version 2.0.6: April 17, 2013: boot changes, linux 3.4.40:

* Linux 3.4.40 (upstream).

* Limit CPU speeds during boot to stock speeds.

* Enable the thermal driver 5 seconds into the boot (previously was 30 seconds).

* Small changes to the ramdisk from the 2.04 update (I forgot these before).

Version 2.0.3: April 15, 2013: on_demand, battery, HTC spew:

* HTC insists on adding more and more debugging messages to the kernel log. Clean these up.

* OnDemand: revert a CAF change I made and disable io_is_busy.

* Remove HTC's over-volting for CPUs binned anything other than nominal.

* defconfig changes to ease building the kernel for CM10.1 (no you can't use this one for CM10.1!).

Version 2.0.0: April 11, 2013: 2.04 (OTA) source drop:

* Updated to Linux 3.4.39

* Updated to HTC's release of 2.04 source

* cgroup permissions fix

* Otherwise the same as 1.2.6

* Note: After running this for a day, I feel like the battery is draining faster and the phone is hotter than it should be. I'm looking into that.

Changelog from 1.2.x

Version 1.2.6: April 4, 2013: ramdisk fix, lowmemorykiller, hsic wakelocks:

* Fix a problem where the ramdisk was no longer disabling mpdecision and thermald. This issue causes a very minor additional battery drain that has now be fixed (Thanks t1gartist!).

* CAF updates to lowmemorykiller.

* Reapply elkay's HSIC fixes by pulling the real commits from CAF (instead of his hand copied commits) which fixes two problems in his commits.

1.2.2: April 1, 2013: linux 3.4.38, lag fixes, bluetooth drivers, cleanup:

* Undo some dubious commits (or extra code included in unrelated commits, what I meant by "early mistakes"). I reexamined every commit in the kernel to decide whether to keep it or remove it.

* Bluetooth drivers are the current CAF msm-3.4 drivers.

* Additional CPU speed and governor information added in /proc/cpuinfo.

* Cleaner patching to upstream linux (see my github repo for the clean upstream patching).

* Linaro -O3 compilation was redone from scratch because there were some problems found by kern3l in the original patches I pulled, I wanted to ensure that there were no other problems so I redid the work myself.

Changelog from the 1.0.x series:

1.0.27: Mar 25, 2013: thermald, simple_plug

* Make the previous changes to simple_plug less aggressive about turning cores back off when applications force them online. We now detect that this has occurred and give the application 2 minutes to be in charge before we force the state back to what we want.

* Change thermald default throttling to be slightly less strict.

1.0.25: Mar 21, 2013: Linux 3.4.37, simple_plug, performance

* Linux 3.4.37

* simple_plug: add a verify mode (every 5 seconds => almost 0 cost) that fixes the state when apps bring cores on/off-line (e.g. kernel tuner).

* rwsem performance improvements

* CAF improvements (correctness, performance) of the power management layer

1.0.21: Mar 16, 2013: Linux 3.4.36

* Linux 3.4.36

* Small bug fixes from CAF

1.0.18: Mar 7, 2013: Linux 3.4.35

* Linux 3.4.35

1.0.17: Mar 4, 2013: Linux 3.4.34, Linaro 4.7-2013.02, thermald fix

* Linux 3.4.34.

* Linaro 4.7: stopped using 4.8 beta builds due to stability fears and lack of apparent benefit from it. The latest 4.7 drop back-ports some optimizations anyway.

* lowmemorykiller: switch to the CAF version of the low memory killer.

* Fixed several bugs in HTC's thermal driver that could cause the termal driver to miss thermal events.

1.0.15: Feb 26, 2013: Battery optimization, performance, thermal & hotplug improvements

* governor: make ondemand the default governor

* GPU: Very minor GPU overclock to 487MHz (from mdeejay).

* msm_thermal: react better when temperature decreases.

* simple_plug: be slightly less aggressive about bringing cores online.

* New suspend mode PM_SUSPEND_FREEZE

* Oprimization for RWSEM lock handoffs.

* RCU locking in cpufreq!

* Disable more HTC debugging code.

1.0.11: Feb 22, 2013: Battery optimizations, Linaro 4.8 build, update.zip format

* Disable HTC's PNP power manager and adaptive policy services (used for thermald / mpdecision which are already disabled).

* Turn off all the kernel code that was polling to compute the state needed for thermald / mpdecision.

* Turn off a bunch of HTC statistic collection and debugging that isn't needed and wastes battery.

* Linux 3.4.33: fixes a kernel memory corruption/hang in all 3.0 and 3.4 kernels

* Sparkco's 4.8 Linaro build is now being used to compile the kernel

* Moved to update.zip format with less commonly used modules moved to loadable modules.

1.0.8: Feb 19, 2013: Switch to different OC values

* Now using mdeejay's over/unclocking (hopefully solving the L2 cache corruption panic).

* thermal driver is less aggressive about throttling the phone with an additional early step down to stock speed

(50C => 1.5GHz, 75C => 1.3GHz, 83C => 918MHz, 90C => 384MHz).

* Linux 3.4.32 (although no changes that would affect our phone).

1.0.7: Feb 15, 2013: thermal driver no longer polls for state

* Linux 3.4.31.

* Now using the 2013-01 build of the Linaro toolchain.

* Major rewrite of the thermal driver to remove polling (now uses essentially no power).

* Tweaks to the hot-plug driver to reduce CPU consumed to reduce power consumed.

1.0.5: miscellaneous optimizations

* Optimization: use optimized memcpy for user-space copies

* Update to linux 3.4.30

* Tons more cleansing of excessive debugging output

* Use RCU_FAST_NO_HZ as caf claims to have found that this improves battery life

* More linaro -O3 fixes from kern3l via dsb

1.0.2

* cm3629 driver, removed power button pocket check (sounds like a good idea, doesn't work and is a likely candidate for an infrequent sensor drain coming from the proximity sensor not turning off).

* cm3629 remove some unused functionality.

* Two small fixes from kern3l via dsb9938's kernel.

* clean some log messages.

1.0.0

* Merge linux 3.4.29

* simple_plug: a new CPU hot-plug driver (default)

* msm_thermal: a new thermal throttling driver (default)

* faux123's intelli_plug (disabled by default)

* faux123's intellidemand governor (default)

* disable mpdecision and thermald in initrd

* dsb9938's overclocking tables, GPU fix and more -O3 changes

* optimizations/fixes from faux123's mako kernel

* Based on elkay's LK kernel which is based on dsb9938's kernel.

* Includes all elkay's HSIC fixes, but nothing beyond that.

* Linaro -O3 compilation (zarboz) and other compiler flags (dsb9938).

* Disabled remote assistance because that just creeps me out.

* NTFS and CIFS.

* Various optimizations and improvements (faux123's mako kernel, similar to dsb9938's pulls from there).

* Force fast-charge (dsb9938).

* Voltage control (faux123).

* Latest OnDemand and Interactive governors from faux123's mako kernel.

* Large set of scheduler fixes / improvements (faux123).

* Underclocking (but not overclocking right now) to 192 MHz.

* BFQ I/O scheduler (default).

* Cleaned up debugging to make the kmsg more useful.

FAQ

sweep2wake: I have no plans to add that to this kernel at this time.