Re: [PATCH v2 1/2] mm: free compound page with correct order

2014-10-24 Thread Yu Zhao
On Wed, Oct 15, 2014 at 12:30:44PM -0700, Andrew Morton wrote: > On Wed, 15 Oct 2014 12:20:04 -0700 Yu Zhao wrote: > > > Compound page should be freed by put_page() or free_pages() with > > correct order. Not doing so will cause tail pages leaked. > > > > The compound order can be obtained by co

Re: [PATCH v2 1/2] mm: free compound page with correct order

2014-10-15 Thread Kirill A. Shutemov
On Wed, Oct 15, 2014 at 12:30:44PM -0700, Andrew Morton wrote: > > @@ -232,7 +232,7 @@ static unsigned long shrink_huge_zero_page_scan(struct > > shrinker *shrink, > > if (atomic_cmpxchg(&huge_zero_refcount, 1, 0) == 1) { > > struct page *zero_page = xchg(&huge_zero_page, NULL); >

Re: [PATCH v2 1/2] mm: free compound page with correct order

2014-10-15 Thread Andrew Morton
On Wed, 15 Oct 2014 12:20:04 -0700 Yu Zhao wrote: > Compound page should be freed by put_page() or free_pages() with > correct order. Not doing so will cause tail pages leaked. > > The compound order can be obtained by compound_order() or use > HPAGE_PMD_ORDER in our case. Some people would argu