mm: fix cma allocation time too long [1/1]
authorTao Zeng <tao.zeng@amlogic.com>
Fri, 14 Jun 2019 07:06:40 +0000 (15:06 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 20 Jun 2019 05:50:16 +0000 (22:50 -0700)
commit4a456864cacbba0378f3e4438db0594b19c9b5fe
tree5f772441ce077b869177445097e469cc3a7d053b
parent593165ef57328fe353e379870a9bac8c902dff60
mm: fix cma allocation time too long [1/1]

PD#TV-6340

Problem:
When quickly enter live tv just after boot to home, video may display
more than 10 seconds late after sound comeout. The main problem is
cma allocation time too long.

Solution:
1, add a page flag for pages under cma allocating. And do not
increase page-ref count for cma pages under allocating when it
is used by user space again.
2, restrict shmem/swap back pages using cma
3, improve cma using policy check in page allocating process.
4, replace righ page trace for migrated pages.

Change-Id: Ie6b591213a9eda974c3443ca9b491fa8d00cee50
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
15 files changed:
arch/arm/include/asm/system_misc.h
arch/arm64/include/asm/system_misc.h
arch/arm64/kernel/process.c
drivers/amlogic/memory_ext/aml_cma.c
include/linux/page-flags.h
include/trace/events/mmflags.h
mm/cma.c
mm/compaction.c
mm/ksm.c
mm/memory.c
mm/migrate.c
mm/page_alloc.c
mm/shmem.c
mm/swap_state.c
mm/vmscan.c