Re: [PATCH v2 2/2] mm/page_alloc: refactor build_node_zonelist() out of build_zonelists()

From: Gregory Price

Date: Mon Sep 14 2026 - 11:31:21 EST


On Mon, Sep 14, 2026 at 04:56:30PM +0200, Vlastimil Babka (SUSE) wrote:
> On 9/12/26 05:04, Gregory Price wrote:
> > Extract per-node fallback-list construction into build_node_zonelist().
> > Build each selected node directly into the destination zonelist so no
> > intermediate node_order array or node count is needed. Print the fallback
> > order as each node is added.
> >
> > This lets us build new zonelists from candidate nodemasks instead of just
> > the default N_MEMORY node state list.
> >
> > No functional change: build_zonelists() builds and prints the same FALLBACK
> > list over N_MEMORY with node_load updates as before.
> >
> > Signed-off-by: Gregory Price <gourry@xxxxxxxxxx>
>
> Nice, glad this way of refactor was feasible.
>

Yup, came out much cleaner than i expected.

> Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
>

Thank you!