mm: Fix buddy list helpers
diff mbox series

Message ID 155033679702.1773410.13041474192173212653.stgit@dwillia2-desk3.amr.corp.intel.com
State In Next
Commit 54e66d9fb6f4ad21d8c0cabc94fab1ab62c659d6
Headers show
Series
  • mm: Fix buddy list helpers
Related show

Commit Message

Dan Williams Feb. 16, 2019, 5:07 p.m. UTC
Tetsuo reports that free page statistics are not reporting correctly,
and Vlastimil noticed that "mm: Move buddy list manipulations into
helpers" botched one of its conversions of add_to_free_area(). Fix the
double-increment of ->nr_free.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
Hi Andrew,

Please fold this into
mm-move-buddy-list-manipulations-into-helpers.patch.

 mm/page_alloc.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Michal Hocko Feb. 18, 2019, 9:42 a.m. UTC | #1
On Sat 16-02-19 09:07:02, Dan Williams wrote:
> Tetsuo reports that free page statistics are not reporting correctly,
> and Vlastimil noticed that "mm: Move buddy list manipulations into
> helpers" botched one of its conversions of add_to_free_area(). Fix the
> double-increment of ->nr_free.
> 
> Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
> Reported-by: Vlastimil Babka <vbabka@suse.cz>
> Cc: Michal Hocko <mhocko@suse.com>
> Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Thanks for catching that. I have really missed it during review.
Sorry about that.

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> Hi Andrew,
> 
> Please fold this into
> mm-move-buddy-list-manipulations-into-helpers.patch.
> 
>  mm/page_alloc.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2a0969e3b0eb..da537fc39c54 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1851,7 +1851,6 @@ static inline void expand(struct zone *zone, struct page *page,
>  			continue;
>  
>  		add_to_free_area(&page[size], area, migratetype);
> -		area->nr_free++;
>  		set_page_order(&page[size], high);
>  	}
>  }
>

Patch
diff mbox series

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2a0969e3b0eb..da537fc39c54 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1851,7 +1851,6 @@  static inline void expand(struct zone *zone, struct page *page,
 			continue;
 
 		add_to_free_area(&page[size], area, migratetype);
-		area->nr_free++;
 		set_page_order(&page[size], high);
 	}
 }