mm: change lmk/cma using policy [1/1]
authorTao Zeng <tao.zeng@amlogic.com>
Wed, 16 Oct 2019 08:44:11 +0000 (16:44 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 30 Oct 2019 05:50:23 +0000 (22:50 -0700)
commit3077caaa6b48780bc7c4c7e43abb65232b00423d
treee7102ba3891e1bf94c9e45c68bf9f38c8694d12b
parent49843ffcc57bcdcc3e823a2c73edc9547f484f69
mm: change lmk/cma using policy [1/1]

PD#TV-10462

Problem:
Memory will allocation fail if play secure vedio source. Usually
seen by zram/wifi driver

Solution:
1, wake up kswapd earlier if water mark without free cma is not ok;
2, using zone-filecache to increace active of lmk. Which can be more
accurate than using global page status;
3, remove some restrict of using cma when allocate movable page by
zram or migrate from cma pool;
4, try allocate hard for atomic request in soft IRQ

Verify:
T950L

Change-Id: Ibf03f3c11a32175e9983ee8a61a14ae4b2436f1e
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
drivers/amlogic/memory_ext/aml_cma.c
drivers/staging/android/lowmemorykiller.c
mm/page_alloc.c