mm: optimize for CMA allocate time
PD#159608: mm: optimize for CMA allocate time
1. Make all amlogic-changed mm code configuarable, which are
wrapped by CONFIG_AMLOGIC_CMA/CONFIG_AMLOGIC_MEMORY_EXTEND
2. Implement some core code of CMA to a single file:
drivers/amlogic/memory_ext/aml_cma.c
3. detailed imporove steps:
a) use NOOP as default IO-scheduler for nand based storage.
which can avoid long time wait for page lock found in
CFQ scheduler;
b) use per-cpu thread to allocate CMA concurrent when driver
request large amount CMA memory; these threads have high
user nice value to reduce schedule delay;
c) increase task user nice of mmc queue and kswapd.
d) wake up kswapd if page are hold by kswap shrink list and
cma isolated test failed.
e) Fobidden low user nice task use CMA, which can avoid priority
inversion problem.
f) optimize for LRU usage, devide each type of LRU to 2 parts,
normal pages are linked after LRU head, CMA pages are linked
after cma_list.
g) avoid compaction case move cma forbidden pages to cma area.
h) Increase strength of lowmemory killer.
4. Improve read speed of /proc/pagetrace, a filter can be set to
reduce message which not print functions allocate memory less
than filter value:
echo filter=xxx > /proc/pagetrace
Change-Id: Ie79288b7947aa642e4f7eacc25565559a73660df
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
27 files changed: