Skip to content

Cleanup transhuge_xxx helpers

Yang Shi linux-mm lkml 5 versions – Applied

Status from this message: [merged mm-stable] doc-proc-fix-the-description-to-thpeligible.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest7 patches 9 repliesApplied 7/7
  2. v47 patches 7 repliesSuperseded
  3. v37 patches 32 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v27 patches2 repliesSuperseded
v17 patches2 repliesSuperseded

Patches in v5 All 7 applied

#Subject and filesSizeRepliesApplied
1/7mm: khugepaged: check THP flag in hugepage_vma_check()mm/khugepaged.c+3 -00 repliesApplied
2/7mm: thp: consolidate vma size check to transhuge_vma_suitableinclude/linux/huge_mm.h include/linux/khugepaged.h mm/huge_memory.c +1 more+18 -280 repliesApplied
3/7mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidatemm/khugepaged.c+7 -10 repliesApplied
4/7mm: thp: kill transparent_hugepage_active()fs/proc/task_mmu.c include/linux/huge_mm.h include/linux/khugepaged.h +2 more+56 -623 repliesApplied
5/7mm: thp: kill __transhuge_page_enabled()fs/proc/task_mmu.c include/linux/huge_mm.h mm/huge_memory.c +2 more+52 -730 repliesApplied
6/7mm: khugepaged: reorg some khugepaged helpersinclude/linux/huge_mm.h include/linux/khugepaged.h mm/huge_memory.c +1 more+21 -230 repliesApplied
7/7doc: proc: fix the description to THPeligibleDocumentation/filesystems/proc.rst+3 -10 repliesApplied

Reviews trailers per patch

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

PatchZach O'KeefeMiaohe Lin
1/7R-b R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [mm-unstable v5 PATCH 0/7] Cleanup transhuge_xxx helpers

v5: * Removed transparent_hugepage_active() for !THP, per Zach.
Patch 4/7 and 5/7 were updated accordingly.
* Collected review tags.
v4: * Consolidated the transhuge_vma_size_ok() helper proposed in the
earlier versions into transhuge_vma_suitable(), per Zach.
* Fixed the regression introduced by patch 3/7, per Zach and Miaohe.
* Reworded the comment for transhuge_vma_suitable(), per Zach.
* Removed khugepaged_enter() per Miaohe.
* More comments for hugepage_vma_check(), per Zach.
* Squashed patch 4/7 (mm: khugepaged: use transhuge_vma_suitable replace open-code) in the earlier version into patch 2/7 of this version.
* Minor correction to the doc about THPeligible (patch 7/7), so the total number of patches is kept 7.
v3: * Fixed the comment from Willy
v2: * Rebased to the latest mm-unstable
* Fixed potential regression for smaps's THPeligible

This series is the follow-up of the discussion about cleaning up transhuge_xxx helpers at https://lore.kernel.org/linux-mm/[email protected]/.

THP has a bunch of helpers that do VMA sanity check for different paths, they do the similar checks for the most callsites and have a lot duplicate codes. And it is confusing what helpers should be used at what conditions.

This series reorganized and cleaned up the code so that we could consolidate all the checks into hugepage_vma_check().

The transhuge_vma_enabled(), transparent_hugepage_active() and __transparent_hugepage_enabled() are killed by this series.

Yang Shi (7):
mm: khugepaged: check THP flag in hugepage_vma_check()
mm: thp: consolidate vma size check to transhuge_vma_suitable
mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidate
mm: thp: kill transparent_hugepage_active()
mm: thp: kill __transhuge_page_enabled()
mm: khugepaged: reorg some khugepaged helpers
doc: proc: fix the description to THPeligible

 Documentation/filesystems/proc.rst |  4 ++-
 fs/proc/task_mmu.c                 |  2 +-
 include/linux/huge_mm.h            | 80 +++++++++++++++++++----------------------------------------
 include/linux/khugepaged.h         | 30 ----------------------
 mm/huge_memory.c                   | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 mm/khugepaged.c                    | 84 +++++++++++++++++++-------------------------------------------
 mm/memory.c                        |  7 ++++--
 7 files changed, 130 insertions(+), 158 deletions(-)