gpu: ion: Add ion_page_pool.
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 13 Dec 2013 22:24:10 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:39 +0000 (08:55 -0800)
commit0214c7f20bf4d5d2e204afaf43789f2f4782d9ae
tree845e2b942a0ac23089623af56830cbb6ad112e74
parent98d5d5f8bad43770803a08e5a969cc9d8200b681
gpu: ion: Add ion_page_pool.

This patch adds a new utility heaps can use to manage
memory.  In the past we have found it can be very
expensive to manage the caches when allocating memory,
but it is imposible to know whether a previous user of a
given memory allocation had a cached mapping. This patch
adds the ability to store a pool of pages that were
previously used uncached so that cache maintenance
only need be done when growing this pool.  The pool also
contains a shrinker so memory from the pool can be
recovered in low memory conditions.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/Makefile
drivers/staging/android/ion/ion_page_pool.c [new file with mode: 0644]
drivers/staging/android/ion/ion_priv.h