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

From: Gioh Kim
Date: Sun Oct 26 2014 - 20:02:36 EST




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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/