Re: [PATCH v3 0/2] mm/mm_init: simplify zone_spanned_pages_in_node()

From: Mike Rapoport

Date: Sun Aug 23 2026 - 10:22:24 EST


Hi,

> 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.

I'm not convinced that the result is easier to follow.

Indeed the same start and end variables are updated before and after
adjust_zone_range_for_zone_movable(), but it's clear that movable zone
adjustments require this.

Having the same adjustments inline forces the reader to track the exact
range comparison with and without zone movable and I don't see it as a
win.

--
Sincerely yours,
Mike.