KonstaT/zte-kernel-msm7x27 — pull request #2 by plaguedbypenguins (2013-05-11 06:13:03+00:00)
Title: backport lowmemorykiller from CAF msm-3.4

this improves low memory behaviour greatly due to accounting for
lowmem_reserve as well as shmem pages.

with this patch lowmemorykiller seems to catch all cases that it used to miss and would fall through to the regular linux oom killer. interactivity is up 'cos old and unused apps are correctly culled by lowmemorykiller before the kernel gets really short of ram. also app switching seems a little better - presumably because there's now a bit in reserve for incoming apps to allocate.

I'm also not 100% sure of the relationship between shmem, file_pages and ashmem accounting, but firefox uses 30m of ashmem with a .so and seems to be far better handled by this new code than with the old lowmemorykiller.

the zone code isn't needed and could be tidied out in another patch later as we only have a single 0==Normal zone, but leaving the code a little more general for possible future use on other devices seems like a good idea as the overhead is low.

also I'm running without the
sys.mem.max_hidden_apps=10
hack now, and with no swap, and the device still seems to be behaving well, so once this patch is applied that limit can probably be dropped... ???