Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400740

RE: mm: pages are not freed from lru_add_pvecs after process termination

From "Odzioba, Lukasz" <lukasz.odzioba@intel.com>
Newsgroups linux.kernel
Subject RE: mm: pages are not freed from lru_add_pvecs after process termination
Date 2016-05-13 14:10 +0200
Message-ID <ryk4O-2Yo-13@gated-at.bofh.it> (permalink)
References (5 earlier) <rvbKq-2q1-21@gated-at.bofh.it> <rvlTr-3yx-5@gated-at.bofh.it> <rvPHQ-7CY-25@gated-at.bofh.it> <rvQuf-8qB-13@gated-at.bofh.it> <rxxdL-3FS-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 05-11-16 09:53:00, Michal Hocko wrote:
> Yes I think this makes sense. The only case where it would be suboptimal
> is when the pagevec was already full and then we just created a single
> page pvec to drain it. This can be handled better though by:
> 
> diff --git a/mm/swap.c b/mm/swap.c
> index 95916142fc46..3fe4f180e8bf 100644
> --- a/mm/swap.c
> +++ b/mm/swap.c
> @@ -391,9 +391,8 @@ static void __lru_cache_add(struct page *page)
> 	struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
>  
> 	get_page(page);
>-	if (!pagevec_space(pvec))
>+	if (!pagevec_add(pvec, page) || PageCompound(page))
> 		__pagevec_lru_add(pvec);
>-	pagevec_add(pvec, page);
> 	put_cpu_var(lru_add_pvec);
 >}
 
Oh yeah, that's exactly what I meant, couldn't find such elegant way of
handling this special case and didn't want to obscure the idea.

I'll do the tests proposed by Date and be back here with results next week.

Thank you guys for the involvement,
Lukas

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: mm: pages are not freed from lru_add_pvecs after process  termination "Odzioba, Lukasz" <lukasz.odzioba@intel.com> - 2016-05-13 14:10 +0200

csiph-web