Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/mm_init.c: only align start of ZONE_MOVABLE on nodes with memory

At the beginning of find_zone_movable_pfns_for_nodes(), it has properly
set node_states[N_MEMORY] in early_calculate_totalpages().

Instead of iterating over all possible nodes, we can just do the alignment
on nodes with memory.

Link: https://lkml.kernel.org/r/20250211082900.10877-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Wei Yang and committed by
Andrew Morton
4bc2e699 4ddb2092

+1 -1
+1 -1
mm/mm_init.c
··· 545 545 546 546 out2: 547 547 /* Align start of ZONE_MOVABLE on all nids to MAX_ORDER_NR_PAGES */ 548 - for (nid = 0; nid < MAX_NUMNODES; nid++) { 548 + for_each_node_state(nid, N_MEMORY) { 549 549 unsigned long start_pfn, end_pfn; 550 550 551 551 zone_movable_pfn[nid] =