staging: ion: Add private buffer flag to skip page pooling on free
authorMitchel Humpherys <mitchelh@codeaurora.org>
Mon, 17 Feb 2014 21:58:39 +0000 (13:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 19:05:08 +0000 (11:05 -0800)
commit53a91c68fa7b5f3ca45d2f1c88bf36a988b74e81
tree09ecd833ab1fd77bbdf0b0e0ac4cd8655a396ec9
parentb9daf0b60b8a6a5151fca0e8cbb2dab763a3e92a
staging: ion: Add private buffer flag to skip page pooling on free

Currently, when we free a buffer it might actually just go back into a
heap-specific page pool rather than going back to the system. This poses
a problem because sometimes (like when we're running a shrinker in low
memory conditions) we need to force the memory associated with the
buffer to truly be relinquished to the system rather than just going
back into a page pool.

There isn't a use case for this flag by Ion clients, so make it a
private flag. The main use case right now is to provide a mechanism for
the deferred free code to force stale buffers to bypass page pooling.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_heap.c
drivers/staging/android/ion/ion_priv.h
drivers/staging/android/ion/ion_system_heap.c