Commit e3d9b45f authored by Haifeng Xu's avatar Haifeng Xu Committed by Andrew Morton

mm/mm_init.c: move set_pageblock_order() to free_area_init()

pageblock_order only needs to be set once, there is no need to initialize
it in every zone/node.

Link: https://lkml.kernel.org/r/20230601063536.26882-1-haifeng.xu@shopee.comSigned-off-by: default avatarHaifeng Xu <haifeng.xu@shopee.com>
Reviewed-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 16618670
...@@ -1585,7 +1585,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat) ...@@ -1585,7 +1585,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat)
if (!size) if (!size)
continue; continue;
set_pageblock_order();
setup_usemap(zone); setup_usemap(zone);
init_currently_empty_zone(zone, zone->zone_start_pfn, size); init_currently_empty_zone(zone, zone->zone_start_pfn, size);
} }
...@@ -1852,6 +1851,8 @@ void __init free_area_init(unsigned long *max_zone_pfn) ...@@ -1852,6 +1851,8 @@ void __init free_area_init(unsigned long *max_zone_pfn)
/* Initialise every node */ /* Initialise every node */
mminit_verify_pageflags_layout(); mminit_verify_pageflags_layout();
setup_nr_node_ids(); setup_nr_node_ids();
set_pageblock_order();
for_each_node(nid) { for_each_node(nid) {
pg_data_t *pgdat; pg_data_t *pgdat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment