[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e261a18d-0ea3-4fba-9774-aa58270809af@suse.cz>
Date: Wed, 1 Oct 2025 15:47:10 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Hu Song <husong@...inos.cn>, Andrew Morton <akpm@...ux-foundation.org>
Cc: Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Brendan Jackman <jackmanb@...gle.com>, Johannes Weiner <hannes@...xchg.org>,
Zi Yan <ziy@...dia.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/page_owner: simplify zone iteration logic in
init_early_allocated_pages()
On 9/30/25 11:21 AM, Hu Song wrote:
> From: Song Hu <husong@...inos.cn>
>
> 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.
>
> Signed-off-by: Song Hu <husong@...inos.cn>
LGTM.
Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
Powered by blists - more mailing lists