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>
Fri, 25 Oct 2019 07:09:00 +0000 (00:09 -0700)
commit74a35431d24bddd0899e99567119548954c0e0e8
tree5d323249fbdd1b0f9c02e13b3fe048dc6f10ef96
parent9aa1021d2b2ab2a0bb264c7123d0805d2b5e95dc
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