linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, hugetlb: correct missing private flag clearing
@ 2013-09-30  7:59 Joonsoo Kim
  2013-09-30 21:35 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Joonsoo Kim @ 2013-09-30  7:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Rik van Riel, Mel Gorman, Michal Hocko, Aneesh Kumar K.V,
	KAMEZAWA Hiroyuki, Hugh Dickins, Davidlohr Bueso, David Gibson,
	linux-mm, linux-kernel, Joonsoo Kim, Wanpeng Li, Naoya Horiguchi,
	Hillf Danton, Joonsoo Kim

We should clear the page's private flag when returing the page to
the page allocator or the hugepage pool. This patch fixes it.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
Hello, Andrew.

I sent the new version of commit ('07443a8') before you did pull request,
but it isn't included. It may be losted :)
So I send this fix. IMO, this is good for v3.12.

Thanks.

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b49579c..691f226 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -653,6 +653,7 @@ static void free_huge_page(struct page *page)
 	BUG_ON(page_count(page));
 	BUG_ON(page_mapcount(page));
 	restore_reserve = PagePrivate(page);
+	ClearPagePrivate(page);
 
 	spin_lock(&hugetlb_lock);
 	hugetlb_cgroup_uncharge_page(hstate_index(h),
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm, hugetlb: correct missing private flag clearing
  2013-09-30  7:59 [PATCH] mm, hugetlb: correct missing private flag clearing Joonsoo Kim
@ 2013-09-30 21:35 ` Andrew Morton
  2013-10-01  1:16   ` Joonsoo Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2013-09-30 21:35 UTC (permalink / raw)
  To: Joonsoo Kim
  Cc: Rik van Riel, Mel Gorman, Michal Hocko, Aneesh Kumar K.V,
	KAMEZAWA Hiroyuki, Hugh Dickins, Davidlohr Bueso, David Gibson,
	linux-mm, linux-kernel, Joonsoo Kim, Wanpeng Li, Naoya Horiguchi,
	Hillf Danton

On Mon, 30 Sep 2013 16:59:44 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:

> We should clear the page's private flag when returing the page to
> the page allocator or the hugepage pool. This patch fixes it.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---
> Hello, Andrew.
> 
> I sent the new version of commit ('07443a8') before you did pull request,
> but it isn't included. It may be losted :)
> So I send this fix. IMO, this is good for v3.12.
> 
> Thanks.
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index b49579c..691f226 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -653,6 +653,7 @@ static void free_huge_page(struct page *page)
>  	BUG_ON(page_count(page));
>  	BUG_ON(page_mapcount(page));
>  	restore_reserve = PagePrivate(page);
> +	ClearPagePrivate(page);
>  

You describe it as a fix, but what does it fix?  IOW, what are the
user-visible effects of the change?

update_and_free_page() already clears PG_private, but afaict the bit
remains unaltered if free_huge_page() takes the enqueue_huge_page()
route.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm, hugetlb: correct missing private flag clearing
  2013-09-30 21:35 ` Andrew Morton
@ 2013-10-01  1:16   ` Joonsoo Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Joonsoo Kim @ 2013-10-01  1:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Rik van Riel, Mel Gorman, Michal Hocko, Aneesh Kumar K.V,
	KAMEZAWA Hiroyuki, Hugh Dickins, Davidlohr Bueso, David Gibson,
	linux-mm, linux-kernel, Wanpeng Li, Naoya Horiguchi,
	Hillf Danton

On Mon, Sep 30, 2013 at 02:35:14PM -0700, Andrew Morton wrote:
> On Mon, 30 Sep 2013 16:59:44 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
> 
> > We should clear the page's private flag when returing the page to
> > the page allocator or the hugepage pool. This patch fixes it.
> > 
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > ---
> > Hello, Andrew.
> > 
> > I sent the new version of commit ('07443a8') before you did pull request,
> > but it isn't included. It may be losted :)
> > So I send this fix. IMO, this is good for v3.12.
> > 
> > Thanks.
> > 
> > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > index b49579c..691f226 100644
> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -653,6 +653,7 @@ static void free_huge_page(struct page *page)
> >  	BUG_ON(page_count(page));
> >  	BUG_ON(page_mapcount(page));
> >  	restore_reserve = PagePrivate(page);
> > +	ClearPagePrivate(page);
> >  
> 
> You describe it as a fix, but what does it fix?  IOW, what are the
> user-visible effects of the change?
> 
> update_and_free_page() already clears PG_private, but afaict the bit
> remains unaltered if free_huge_page() takes the enqueue_huge_page()
> route.

Yes, you are right.
I attach another version having more explanation.
Please refer this and merge it.

Thanks.
------------------------->8---------------------------------

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

end of thread, other threads:[~2013-10-01  1:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30  7:59 [PATCH] mm, hugetlb: correct missing private flag clearing Joonsoo Kim
2013-09-30 21:35 ` Andrew Morton
2013-10-01  1:16   ` Joonsoo Kim

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