linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_alloc: call set_pageblock_order() once for each node
@ 2018-03-29  3:36 Wei Yang
  2018-03-29 12:11 ` Mel Gorman
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Yang @ 2018-03-29  3:36 UTC (permalink / raw)
  To: akpm, mhocko, mgorman; +Cc: linux-mm, Wei Yang

set_pageblock_order() is a standalone function which sets pageblock_order,
while current implementation calls this function on each ZONE of each node
in free_area_init_core().

Since free_area_init_node() is the only user of free_area_init_core(),
this patch moves set_pageblock_order() up one level to invoke
set_pageblock_order() only once on each node.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8c964dcc3a9e..828f5014b006 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6169,7 +6169,6 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
 		if (!size)
 			continue;
 
-		set_pageblock_order();
 		setup_usemap(pgdat, zone, zone_start_pfn, size);
 		init_currently_empty_zone(zone, zone_start_pfn, size);
 		memmap_init(size, nid, j, zone_start_pfn);
@@ -6254,6 +6253,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
 	alloc_node_mem_map(pgdat);
 
 	reset_deferred_meminit(pgdat);
+	set_pageblock_order();
 	free_area_init_core(pgdat);
 }
 
-- 
2.15.1

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

end of thread, other threads:[~2018-04-06  1:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-29  3:36 [PATCH] mm/page_alloc: call set_pageblock_order() once for each node Wei Yang
2018-03-29 12:11 ` Mel Gorman
2018-03-30  1:02   ` Wei Yang
2018-04-03  7:57     ` Michal Hocko
2018-04-04  1:27       ` Wei Yang
2018-04-05  9:55         ` Michal Hocko
2018-04-06  1:46           ` Wei Yang

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