WSL2-Linux-Kernel/drivers/android
Sherry Yang f2517eb76f android: binder: Add global lru shrinker to binder
Hold on to the pages allocated and mapped for transaction
buffers until the system is under memory pressure. When
that happens, use linux shrinker to free pages. Without
using shrinker, patch "android: binder: Move buffer out
of area shared with user space" will cause a significant
slow down for small transactions that fit into the first
page because free list buffer header used to be inlined
with buffer data.

In addition to prevent the performance regression for
small transactions, this patch improves the performance
for transactions that take up more than one page.

Modify alloc selftest to work with the shrinker change.

Test: Run memory intensive applications (Chrome and Camera)
to trigger shrinker callbacks. Binder frees memory as expected.
Test: Run binderThroughputTest with high memory pressure
option enabled.

Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28 16:47:17 +02:00
..
Kconfig android: binder: Add allocator selftest 2017-08-28 16:47:17 +02:00
Makefile android: binder: Add allocator selftest 2017-08-28 16:47:17 +02:00
binder.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_alloc.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_alloc.h android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_alloc_selftest.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_trace.h binder: refactor binder ref inc/dec for thread safety 2017-07-17 14:48:23 +02:00