Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mm/mm_init: simplify zone_spanned_pages_in_node()
@ 2026-08-06 16:20 Sang-Heon Jeon
  2026-08-06 16:20 ` [PATCH v2 1/5] mm/mm_init: fold adjust_zone_range_for_zone_movable() into its only caller Sang-Heon Jeon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sang-Heon Jeon @ 2026-08-06 16:20 UTC (permalink / raw)
  To: Andrew Morton, Mike Rapoport; +Cc: linux-kernel, linux-mm

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

Patch 5 extracts a local variable and reduces the indentation level.

No functional change.

---
Changes from v1 [1]
- Change base to memblock/for-next
- Add patch 4 to merge the two branches
- Update comment

[1] https://lore.kernel.org/all/20260804144803.3290255-1-ekffu200098@gmail.com/
---

Sang-Heon Jeon (5):
  mm/mm_init: fold adjust_zone_range_for_zone_movable() into its only
    caller
  mm/mm_init: remove redundant clamping in zone_spanned_pages_in_node()
  mm/mm_init: move the range check and clamping inside ZONE_MOVABLE
    branch
  mm/mm_init: use min() when adjusting for ZONE_MOVABLE
  mm/mm_init: clean up zone_spanned_pages_in_node()

 mm/mm_init.c | 79 ++++++++++++++++++++++++----------------------------
 1 file changed, 36 insertions(+), 43 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-06 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 16:20 [PATCH v2 0/5] mm/mm_init: simplify zone_spanned_pages_in_node() Sang-Heon Jeon
2026-08-06 16:20 ` [PATCH v2 1/5] mm/mm_init: fold adjust_zone_range_for_zone_movable() into its only caller Sang-Heon Jeon
2026-08-06 16:20 ` [PATCH v2 2/5] mm/mm_init: remove redundant clamping in zone_spanned_pages_in_node() Sang-Heon Jeon
2026-08-06 16:20 ` [PATCH v2 3/5] mm/mm_init: move the range check and clamping inside ZONE_MOVABLE branch Sang-Heon Jeon
2026-08-06 16:20 ` [PATCH v2 4/5] mm/mm_init: use min() when adjusting for ZONE_MOVABLE Sang-Heon Jeon
2026-08-06 16:20 ` [PATCH v2 5/5] mm/mm_init: clean up zone_spanned_pages_in_node() Sang-Heon Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox