The quilt patch titled Subject: mm/mm_init.c: get the highest zone directly has been removed from the -mm tree. Its filename was mm-mm_initc-get-the-highest-zone-directly.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Wei Yang <richard.weiyang@xxxxxxxxx> Subject: mm/mm_init.c: get the highest zone directly Date: Fri, 31 May 2024 00:26:11 +0000 We have recorded nr_zones in pgdat, just get it directly. Link: https://lkml.kernel.org/r/20240531002613.5231-1-richard.weiyang@xxxxxxxxx Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> Cc: Mike Rapoport (IBM) <rppt@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mm_init.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- a/mm/mm_init.c~mm-mm_initc-get-the-highest-zone-directly +++ a/mm/mm_init.c @@ -2137,7 +2137,7 @@ static int __init deferred_init_memmap(v unsigned long first_init_pfn, flags; unsigned long start = jiffies; struct zone *zone; - int zid, max_threads; + int max_threads; u64 i; /* Bind memory initialisation thread to a local node if possible */ @@ -2164,12 +2164,8 @@ static int __init deferred_init_memmap(v */ pgdat_resize_unlock(pgdat, &flags); - /* Only the highest zone is deferred so find it */ - for (zid = 0; zid < MAX_NR_ZONES; zid++) { - zone = pgdat->node_zones + zid; - if (first_init_pfn < zone_end_pfn(zone)) - break; - } + /* Only the highest zone is deferred */ + zone = pgdat->node_zones + pgdat->nr_zones - 1; /* If the zone is empty somebody else may have cleared out the zone */ if (!deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn, @@ -2197,7 +2193,7 @@ static int __init deferred_init_memmap(v } zone_empty: /* Sanity check that the next zone really is unpopulated */ - WARN_ON(++zid < MAX_NR_ZONES && populated_zone(++zone)); + WARN_ON(pgdat->nr_zones < MAX_NR_ZONES && populated_zone(++zone)); pr_info("node %d deferred pages initialised in %ums\n", pgdat->node_id, jiffies_to_msecs(jiffies - start)); _ Patches currently in -mm which might be from richard.weiyang@xxxxxxxxx are mm-mm_initc-use-deferred_init_mem_pfn_range_in_zone-to-decide-loop-condition.patch mm-mm_initc-not-always-search-next-deferred_init_pfn-from-very-beginning.patch