[Google Pixel 2 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Update to 3.9.1 / 4.1.1 | Android 9.0/PIE

Hey guys and girls,

so this release is out of the ordinary. You all know by now that the Pixel 2/XL has a bit of a multitasking problem where the system sometimes "hangs" a bit when doing memory intensive tasks. Therefore [MENTION=4800121]Sultanxda[/MENTION] created his Simple Low Memory Killer to counter that problem. While he was busy finishing up his project, I also looked into possible solutions.

Maybe the best solution would be to have 6gb of RAM on the Pixel 2/XL, but that´s out of the question of course. So I tried to go a different route and use some backported kernel sections from the 4.9 kernel. (the kernel that snapdragon 845 devices use, so will the pixel 3)

In the experimental release of today (4.1.1) that´s released seperately to the usual update, which includes October Security patches (3.9.1), are (nearly) completey backports from kernel/locking, oom kill/ oom reaper and lowmemorykiller in particular! At this place a thanks to [MENTION=6760768]KuranKaname[/MENTION] for his work on his essential kernel, which I found on github while researching about possible solutions!

To "counter" these peculiar system hangs mentioned earlier, a mechanism is now introduced to the kernel. It´s called oom_reaper and enabled by default on the experimental kernel. I spent 10 minutes opening all my apps in my drawer several time and not once did I encounter a hang. :cowboy::highfive:

You can find information about the oom_reaper linked here and another article that´s quite informative is here.

Additionally CPU and DDR bus gets boosted to max in the ported 4.9 Low Memory Killer Driver when mem reclaim by the lowmemorykiller is invoked, just like in Simple Low Memory Killer . This may cost a tiny bit of battery, but is further preventing possbible microlags while memory is freed.

These changes are tested since friday and I didn´t face a problem. My testers reported only good things from the backport until now. That´s why I decided to release it here as an preview to a broader audience to see if there are issues and how it´s working for everyone. I cannot test all this alone so please help me out there!

The phone also feels smoother now(possibly due to the locking changes), but that may just be my feeling as I´m maybe a bit biased. ;)

It would be absolutely great to get some feedback from users that have a problem with RAM managment on this phone and suffer from problems!

The 4.1.1 release will feature the new backported patches plus all other changes! The 3.9.1 update has all patches except the backported 4.9 changes. Just in case someone doesn´t want to take the plunge.

But I can assure you it´s tested and I wouldn´t release it, if it wouldn´t be working good for me!

Changelog:

- October Security Update

- Upstream to 4.4.159

- updates from kernel/common

- update for cpuidle

- locking sync to 4.9 kernel (only 4.1.1)

- oom_kill/oom_reaper backported from 4.9 kernel (only 4.1.1)

- lowmemorykiller updated to 4.9 kernel state (only 4.1.1)

For more details check out my github page.

Download is below :)

Download:

4.1.1: https://www.androidfilehost.com/?fid=1322778262904018805

3.9.1: https://www.androidfilehost.com/?fid=1322778262904018807

or following the link in the op to the correction version

Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee: http://paypal.me/freak07