mm/page_alloc: Remove the incorrect and misleading comment
Subsystems (2)
PATCH 1/1 mm/page_alloc: Remove the incorrect and misleading comment
The comment removed in this patch originally belonged to the build_zonelists_in_zone_order() function, which was introduced by commit f0c0b2b808f2 ("change zonelist order: zonelist order selection logic").
Later, commit c9bff3eebc09 ("mm, page_alloc: rip out ZONELIST_ORDER_ZONE") removed build_zonelists_in_zone_order() but left its comment behind.
Subsequently, commit 9d3be21bf9c0 ("mm, page_alloc: simplify zonelist initialization") moved the node_order variable into build_zonelists(), making the comment originally belonged to build_zonelists_in_zone_order() appear as if it were part of build_zonelists().
Remove this misleading comment.
--- mm/page_alloc.c | 7 ------- 1 file changed, 7 deletions(-)
mm/page_alloc.c +0 -7
@@ -5161,13 +5161,6 @@ static void build_thisnode_zonelists(pg_data_t *pgdat) zonerefs->zone_idx =0 ; } -/* -* Build zonelists ordered by zone and nodes within zones. -* This results in conserving DMA zone[s] until all Normal memory is -* exhausted, but results in overflowing to remote node while memory -* may still exist in local DMA zone. -*/ -static void build_zonelists (pg_data_t *pgdat) {static int node_order[MAX_NUMNODES ];
Signature · 1 line
2.47.0
Andrew Morton
maintainerQuoted 17 lines · On Wed, 15 Jan 2025 12:16:34 +0800 Yuntao Wang <[email protected]> wrote:
The comment removed in this patch originally belonged to the
build_zonelists_in_zone_order()function, which was introduced by commitf0c0b2b808f2("change zonelist order: zonelist order selection logic").Later, commit
c9bff3eebc09("mm,page_alloc: rip outZONELIST_ORDER_ZONE") removedbuild_zonelists_in_zone_order()but left its comment behind.Subsequently, commit
9d3be21bf9c0("mm,page_alloc: simplify zonelist initialization") moved thenode_ordervariable intobuild_zonelists(), making the comment originally belonged tobuild_zonelists_in_zone_order()appear as if it were part ofbuild_zonelists()....
mm/page_alloc.c static void build_thisnode_zonelists(pg_data_t *pgdat) · line 5170
Quoted 10 lines
mm/page_alloc.c +0
-7@@ -5161,13 +5161,6 @@ static void build_thisnode_zonelists(pg_data_t *pgdat) zonerefs->zone_idx =0 ; } -/* -* Build zonelists ordered by zone and nodes within zones. -* This results in conserving DMA zone[s] until all Normal memory is -* exhausted, but results in overflowing to remote node while memory -* may still exist in local DMA zone. -*/ -
Yes, it's not obvious which code this comment is telling us about.
I do wonder if the information in this comment could be updated and moved somewhere more appropriate, rather than simply removing it. Oh well, not very important.