binder: replace vmalloc range if need more memory [1/1]
authorTao Zeng <tao.zeng@amlogic.com>
Sat, 2 Mar 2019 12:38:49 +0000 (20:38 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 12 Mar 2019 05:21:22 +0000 (21:21 -0800)
commit688caca4988402e80adbc0c3830996532288f3c0
tree32000319e08d8c6c17d1240257c28d488db25fa6
parentd8c8e08253bc354c6077fd1f4114a17028aab534
binder: replace vmalloc range if need more memory [1/1]

PD#SWPL-5553

Problem:
Binder will allocate about 1MB vmalloc memory for IPC for each process,
but under code like GTVS, there are about over 100 vmalloc ranges
allocated by binder, which cause vmalloc address range not enough for
other modules.

Solution:
1, only vmalloc 4KB at first;
2, if user space need more memory, try to allocate a new vmalloc
   range with large size and move all related data to new place
3, dump vmalloc info if vmalloc failed

Verify:
P212

Change-Id: I07eea2623e5e19d410e0ff8a0bc6b11e2037023c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
arch/arm/mm/proc-v7.S
drivers/android/binder_alloc.c
drivers/android/binder_alloc.h
mm/vmalloc.c