ion: Add private buffer flag to skip page pooling on free
authorMitchel Humpherys <mitchelh@codeaurora.org>
Tue, 6 Aug 2013 22:08:23 +0000 (15:08 -0700)
committerMitchel Humpherys <mitchelh@codeaurora.org>
Fri, 20 Dec 2013 05:02:18 +0000 (21:02 -0800)
commit14f162cb64a8beca59f06cd94d5569bd550dc99d
tree0a73bd35165e0d6aafda9b1f7185a8ea3bf899d9
parent550640ca7aec7789cdd52742b4c1d9dd712a5dd8
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.

Change-Id: I724f89cc037083fe8576784363caa18a34e8705a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
drivers/staging/android/ion/ion_heap.c
drivers/staging/android/ion/ion_priv.h
drivers/staging/android/ion/ion_system_heap.c