ion: move shrinker out of heaps
authorColin Cross <ccross@android.com>
Fri, 13 Dec 2013 01:50:35 +0000 (17:50 -0800)
committerColin Cross <ccross@android.com>
Fri, 20 Dec 2013 03:25:39 +0000 (19:25 -0800)
commitf3ae9a8286d63f13715d2082965d6b8849af05a5
tree27804ab966956f2c36f87660e057068bd1dc514d
parent892e1580141cde0f80180e43f6c8c3dc356ddaf2
ion: move shrinker out of heaps

Every heap that uses deferred frees is going to need a shrinker
to shrink the freelist under memory pressure.  Rather than
requiring each heap to implement a shrinker, automatically
register a shrinker if the deferred free flag is set.
The system heap also needs to shrink its page pools, so add
a shrink function to the heap ops that will be called after
shrinking the freelists.

Change-Id: Icda722d683426fadb8ddd1c8e9499264ab682c57
Signed-off-by: Colin Cross <ccross@android.com>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion_heap.c
drivers/staging/android/ion/ion_page_pool.c
drivers/staging/android/ion/ion_priv.h
drivers/staging/android/ion/ion_system_heap.c