staging: ion: debugfs to shrink pool
authorGioh Kim <gioh.kim@lge.com>
Mon, 6 Jul 2015 06:14:41 +0000 (15:14 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2015 05:47:30 +0000 (22:47 -0700)
commitaeb7fa7b4f29ce4d7d16c4c3565c4714f2f62b82
tree38acf3e2cdee0ae2a01d1274e70a2fca45e65602
parentb44d9ce3b81715311198f0c5fa329e518b4f9f18
staging: ion: debugfs to shrink pool

This patch enables debugfs file /sys/kernel/debug/ion/heaps/system_shrink
to shrink pool and get pool size. This technically enables debugfs
shrinking for all heaps, not just the system heap although the system heap
is the only one with a shrinker right now. It is already implemented
but not complete. This patch completes and enables it.

Reading the file returns pool size
in page unit and writing the number of pages shrinks pool.
It flushes all pages to write zero at the file.

Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c