summaryrefslogtreecommitdiff
path: root/include/linux/node.h
diff options
context:
space:
mode:
authorSong Hu <husong@kylinos.cn>2025-09-30 12:21:52 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-11-17 04:28:01 +0300
commitca30ac479e6cf7a210dcad32fa2ee99ca0357e91 (patch)
tree3821642ebd1a748a7a7add74f6efc33ca584f2b6 /include/linux/node.h
parent9686080d627ae95e9a60de29518c07843aad3f77 (diff)
downloadlinux-ca30ac479e6cf7a210dcad32fa2ee99ca0357e91.tar.xz
mm/page_owner: simplify zone iteration logic in init_early_allocated_pages()
The current implementation uses nested loops: first iterating over all online nodes, then over zones within each node. This can be simplified by using the for_each_populated_zone() macro which directly iterates through all populated zones. This change: 1. Removes the intermediate init_zones_in_node() function 2. Simplifies init_early_allocated_pages() to use direct zone iteration 3. Updates init_pages_in_zone() to take only zone parameter and access node_id via zone->zone_pgdat The functionality remains identical, but the code is cleaner and more maintainable. Link: https://lkml.kernel.org/r/20250930092153.843109-2-husong@kylinos.cn Signed-off-by: Song Hu <husong@kylinos.cn> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Ye Liu <liuye@kylinos.cn> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Brendan Jackman <jackmanb@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/node.h')
0 files changed, 0 insertions, 0 deletions