Skip to content

mm/huge_memory: cleanup __split_unmapped_folio()

Wei Yang linux-mm 3 versions – Applied

Status from this message: [merged mm-stable] mm-huge_memory-optimize-old_order-derivation-during-folio-splitting.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 19 repliesApplied 4/4
  2. v22 patches 23 repliesSuperseded
  3. v15 patches 6 repliesSuperseded

Changes in v3 from the cover letter

* only merge 4&5 in v1
* refine the comment

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4mm/huge_memory: avoid reinvoking folio_test_anon()mm/huge_memory.c+4 -31 replyApplied
2/4mm/huge_memory: update folio stat after successful splitmm/huge_memory.c+11 -335 repliesApplied
3/4mm/huge_memory: optimize and simplify folio stat update after splitmm/huge_memory.c+4 -144 repliesApplied
4/4mm/huge_memory: optimize old_order derivation during folio splittingmm/huge_memory.c+8 -59 repliesApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchZi Yanwang lianBarry SongDavid HildenbrandLorenzo Stoakes
1/4R-b R-b R-b A-b R-b
2/4R-b A-b R-b
3/4R-b A-b R-b
4/4R-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [Patch v3 0/4] mm/huge_memory: cleanup __split_unmapped_folio()

This short patch series cleans up and optimizes the internal logic of the __split_unmapped_folio() function.

The goal is to improve clarity and efficiency by eliminating redundant checks, caching stable attribute values, and simplifying the iteration logic used for updating folio statistics.

These changes make the code easier to follow and maintain.

The split_huge_page_test selftest pass.

v3:
* only merge 4&5 in v1
* refine the comment

v2:
* merge patch 2-5
* http://lkml.kernel.org/r/[email protected]

v1:
* http://lkml.kernel.org/r/[email protected]

Wei Yang (4):
mm/huge_memory: avoid reinvoking folio_test_anon() mm/huge_memory: update folio stat after successful split mm/huge_memory: optimize and simplify folio stat update after split mm/huge_memory: optimize old_order derivation during folio splitting

 mm/huge_memory.c | 70 +++++++++++++++---------------------------------
 1 file changed, 21 insertions(+), 49 deletions(-)
Signature · 1 line
2.34.1