[PATCH mm-new v2 0/2] mm/khugepaged: optimize collapse candidate detection

Lance Yang posted 2 patches 2 weeks ago
include/linux/swapops.h |  6 ++++++
mm/khugepaged.c         | 10 ++++++++++
mm/madvise.c            |  6 ------
3 files changed, 16 insertions(+), 6 deletions(-)
[PATCH mm-new v2 0/2] mm/khugepaged: optimize collapse candidate detection
Posted by Lance Yang 2 weeks ago
Hi all,

This series improves the THP scanner by teaching it to detect unsuitable
collapse candidates, such as guard PTEs, earlier in the scan to avoid
wasted work.

Thanks,
Lance

---
v1 -> v2:
 - #01 Dropped patch that skipped mlocked VMAs from THP collapse, per
       discussion. Thanks a lot to Hugh, Kiryl, Lorenzo, Dev and Mika!
 - #02 Pick RB from Lorenzo - thanks!
       Update the changelog (per Lorenzo)
       Pick AB from David - thanks!
 - #03 Reuse SCAN_PTE_NON_PRESENT for guard PTEs (per Lorenzo)
 - https://lore.kernel.org/linux-mm/20250914143547.27687-1-lance.yang@linux.dev

Lance Yang (2):
  mm: make is_guard_pte_marker() available for hugepage collapse
  mm/khugepaged: abort collapse scan on guard PTEs

 include/linux/swapops.h |  6 ++++++
 mm/khugepaged.c         | 10 ++++++++++
 mm/madvise.c            |  6 ------
 3 files changed, 16 insertions(+), 6 deletions(-)

-- 
2.49.0