Skip to content

mm/huge_memory: Modularize and simplify folio splitting paths

Wei Yang linux-mm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm/huge_memory: introduce __split_folio_and_update_stats() to consolidate split taskmm/huge_memory.c+17 -117 replies
2/2mm/huge_memory: separate uniform/non uniform split logic in __split_unmapped_folio()mm/huge_memory.c+16 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] mm/huge_memory: Modularize and simplify folio splitting paths

This two-patch series focuses on refactoring the core logic of folio splitting to improve code structure, clarity, and maintainability.

The first patch introduces a new consolidated helper function that groups all the required tasks involved in a folio split. The second patch then leverages this new helper to clearly separate the different execution paths for uniform and non-uniform splitting, which simplifies __split_unmapped_folio().

This series sets a better foundation for future optimizations and maintenance in the huge memory handling code.

Also selftests/split_huge_page_test pass.

Wei Yang (2):
mm/huge_memory: introduce __split_folio_and_update_stats() to
consolidate split task
mm/huge_memory: separate uniform/non uniform split logic in
__split_unmapped_folio()

 mm/huge_memory.c | 59 +++++++++++++++++++++++++++---------------------
 1 file changed, 33 insertions(+), 26 deletions(-)
Signature · 1 line
2.34.1