Re: [PATCH v2 0/5] mm/mm_init: simplify zone_spanned_pages_in_node()
From: Mike Rapoport
Date: Thu Aug 13 2026 - 15:16:21 EST
> Hello,
>
> This series simplifies zone_spanned_pages_in_node(), which adjusts
> *zone_start_pfn and *zone_end_pfn before and after calling
> adjust_zone_range_for_zone_movable(). The helper adjusts the same two
> values, which makes the code harder to follow.
>
> Split into five patches for easier review. Squashing them into one
> patch when applying is also fine.
>
> Patch 1 folds adjust_zone_range_for_zone_movable() into the caller.
>
> Patch 2 removes the clamping to node_end_pfn, which has no effect.
>
> Patch 3 moves the check and the clamping to node_start_pfn into the
> ZONE_MOVABLE branch, which is the only place they have an effect.
>
> Patch 4 merges the two branches that adjust for zone_movable_pfn[nid].
It would be easier to review if patches 2-4 would be squashed.
> Patch 5 extracts a local variable and reduces the indentation level.
This change can be folded into the first patch.
--
Sincerely yours,
Mike.