linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Fix buddy list helpers
@ 2019-02-16 17:07 Dan Williams
  2019-02-18  9:42 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2019-02-16 17:07 UTC (permalink / raw)
  To: akpm
  Cc: Tetsuo Handa, Vlastimil Babka, Michal Hocko, Tetsuo Handa,
	linux-mm, linux-kernel

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(-)

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);
 	}
 }


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

end of thread, other threads:[~2019-02-18  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16 17:07 [PATCH] mm: Fix buddy list helpers Dan Williams
2019-02-18  9:42 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).