diff options
| author | Wei Yang <[email protected]> | 2025-02-11 08:29:00 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-03-17 05:06:13 +0000 |
| commit | 4bc2e699e3d8f56f2aaafd14109ff77311f95336 (patch) | |
| tree | 55d6fca33fa08664d8ba450fbcbd76a8249f35bf /mm/mm_init.c | |
| parent | Docs/admin-guide/mm/damon/usage: document hugepage_size filter type (diff) | |
| download | kernel-4bc2e699e3d8f56f2aaafd14109ff77311f95336.tar.gz kernel-4bc2e699e3d8f56f2aaafd14109ff77311f95336.zip | |
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/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Reviewed-by: Dev Jain <[email protected]>
Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/mm_init.c')
| -rw-r--r-- | mm/mm_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c index de18d3ad12e1..6078b3651f2e 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -545,7 +545,7 @@ restart: out2: /* Align start of ZONE_MOVABLE on all nids to MAX_ORDER_NR_PAGES */ - for (nid = 0; nid < MAX_NUMNODES; nid++) { + for_each_node_state(nid, N_MEMORY) { unsigned long start_pfn, end_pfn; zone_movable_pfn[nid] = |
