[RFCv2 1/3] staging: ion: shrink page-pool by page unit

Gioh Kim gioh.kim at lge.com
Mon Oct 27 00:01:40 UTC 2014

2014-10-25 오전 5:09, Laura Abbott 쓴 글:
> Hi,
> On 10/23/2014 11:47 PM, Gioh Kim wrote:
>> This patch shrink page-pool by page unit.
> Can you explain a bit more about what this patch is
> fixing? The description in the cover letter would
> be helpful here.

I'm sorry for the lack of explanation.

First, I wanted to shrink ion page-pool, but there was no way for it.
So I checked the existing codes and found a problem.

ion_page_pool_total() returns the number of pages in the pool,
so ion_heap_shrink_count() returns also the number of pages.
ion_page_pool_shrink() takes the argument nr_to_scan as the number of chunk, a bunch of pages.

The system shrinker calls ion_heap_shrink_count() to get nr_to_scan,
and pass it to ion_page_pool_shrink().
The problem is the argument of ion_page_pool_shrink() is the amount of chunk to be shrinked.

We have to make both of them take number of page or chunk respectively.

The first patch is doing it.

The second one is, based on the first patch, making shrink interface via debugfs.
The third is for extra interface.

> Thanks,
> Laura

More information about the devel mailing list