public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/3] staging: ion: enable pool shrinking in page unit
@ 2014-10-29  5:35 Gioh Kim
  2014-10-29  5:35 ` [PATCHv2 1/3] staging: ion: shrink page-pool by " Gioh Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gioh Kim @ 2014-10-29  5:35 UTC (permalink / raw)
  To: gregkh, john.stultz, rebecca, lauraa, dan.carpenter, minchan,
	iamjoonsoo.kim
  Cc: devel, linux-kernel, gunho.lee, Gioh Kim

Hello,

Current pool shrinking is not page unit, block unit.
But shrinker returns the pool size in page unit,
so it is confused.

And there is no way to control pool size and shrink pool directly.

I have 3 patches like followings.

1. Patch 1/3: make pool be shrinked by page unit
This patch shrinks pool in page unit.

2. Patch 2/3: limit pool size
This patch specifies pool size limit via debugfs.
The default value of limit is 0.
cat /sys/kernel/debug/ion/heaps/system_limit returns 0.
If you want to create 4 pools and limit each pool by 10MB,
you can write 40MB(=41943040) at system_limit debugfs file
like following:
echo 41943040 > /sys/kernel/debug/ion/heaps/system_limit

2. Patch 3/3: enable debugfs to shrink page directly
This patch enables debugfs to specify shrink amount.
For instance, this shrinks all pages in every pool.
echo 0 > /sys/kernel/debug/ion/heaps/system_shrink
And this shrinks 300-pages from entire pool.
echo 30 > /sys/kernel/debug/ion/heaps/system_shrink
It try to shrink high-order pool first because high-order pages is necessary
more than low-order when the system has low memory.

This patchset is based on linux-next-20141023.


Gioh Kim (3):
  staging: ion: shrink page-pool by page unit
  staging: ion: limit pool size
  staging: ion: debugfs to shrink pool

 drivers/staging/android/ion/ion.c             |   62 ++++++++++++++++---------
 drivers/staging/android/ion/ion_page_pool.c   |   32 ++++++++-----
 drivers/staging/android/ion/ion_system_heap.c |   20 ++++++--
 3 files changed, 75 insertions(+), 39 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-29  8:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29  5:35 [PATCHv2 0/3] staging: ion: enable pool shrinking in page unit Gioh Kim
2014-10-29  5:35 ` [PATCHv2 1/3] staging: ion: shrink page-pool by " Gioh Kim
2014-10-29  6:45   ` Gioh Kim
2014-10-29  5:35 ` [PATCHv2 2/3] staging: ion: limit pool size Gioh Kim
2014-10-29  5:36 ` [PATCHv2 3/3] staging: ion: debugfs to shrink pool Gioh Kim
2014-10-29  8:40 ` [PATCHv2 0/3] staging: ion: enable pool shrinking in page unit Gioh Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox