linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] support batched checking of the young flag for MGLRU
@ 2026-02-27  9:44 Baolin Wang
  2026-02-27  9:44 ` [PATCH v2 1/6] mm: use inline helper functions instead of ugly macros Baolin Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Baolin Wang @ 2026-02-27  9:44 UTC (permalink / raw)
  To: akpm, david
  Cc: catalin.marinas, will, lorenzo.stoakes, ryan.roberts,
	Liam.Howlett, vbabka, rppt, surenb, mhocko, riel, harry.yoo,
	jannh, willy, baohua, dev.jain, axelrasmussen, yuanchu, weixugc,
	hannes, zhengqi.arch, shakeel.butt, baolin.wang, linux-mm,
	linux-arm-kernel, linux-kernel

This is a follow-up to the previous work [1], to support batched checking
of the young flag for MGLRU.

Similarly, batched checking of young flag for large folios can improve
performance during large-folio reclamation when MGLRU is enabled. I
observed noticeable performance improvements (see patch 5) on an Arm64
machine that supports contiguous PTEs. All mm-selftests are passed.

Patch 1 - 3: cleanup patches.
Patch 4: add a new generic batched PTE helper: test_and_clear_young_ptes().
Patch 5: support batched young flag checking for MGLRU.
Patch 6: implement the Arm64 arch-specific test_and_clear_young_ptes().

[1] https://lore.kernel.org/all/cover.1770645603.git.baolin.wang@linux.alibaba.com/

Changes from v1:
v1: https://lore.kernel.org/all/cover.1771897150.git.baolin.wang@linux.alibaba.com/
 - Update some commit message (per David).
 - Fix some coding style issues (per David).
 - Use VM_WARN_ON_ONCE_FOLIO() instead of VM_WARN_ON_FOLIO() (per Rik).
 - Define a generic ptep_test_and_clear_young_notify() (per David).
 - Remove redundant 'nr > 1' check in folio_referenced_one() (per David).
 - Rename some variables' to make code more clear (per David).
 - Add a new patch to rename some functions (per David).
 - Update the young counters with the batched count for MGLRU.
 - Collect reviewed tags from Rik, Barry, Alistair and David. Thanks.

Baolin Wang (6):
  mm: use inline helper functions instead of ugly macros
  mm: rename ptep/pmdp_clear_young_notify() to
    ptep/pmdp_test_and_clear_young_notify()
  mm: rmap: add a ZONE_DEVICE folio warning in folio_referenced()
  mm: add a batched helper to clear the young flag for large folios
  mm: support batched checking of the young flag for MGLRU
  arm64: mm: implement the architecture-specific
    test_and_clear_young_ptes()

 arch/arm64/include/asm/pgtable.h | 18 +++++++----
 include/linux/mmu_notifier.h     | 54 --------------------------------
 include/linux/mmzone.h           |  5 +--
 include/linux/pgtable.h          | 38 ++++++++++++++++++++++
 mm/internal.h                    | 52 ++++++++++++++++++++++++++++++
 mm/rmap.c                        | 29 ++++++++---------
 mm/vmscan.c                      | 46 ++++++++++++++++++++-------
 7 files changed, 154 insertions(+), 88 deletions(-)

-- 
2.47.3



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

end of thread, other threads:[~2026-02-27  9:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27  9:44 [PATCH v2 0/6] support batched checking of the young flag for MGLRU Baolin Wang
2026-02-27  9:44 ` [PATCH v2 1/6] mm: use inline helper functions instead of ugly macros Baolin Wang
2026-02-27  9:44 ` [PATCH v2 2/6] mm: rename ptep/pmdp_clear_young_notify() to ptep/pmdp_test_and_clear_young_notify() Baolin Wang
2026-02-27  9:44 ` [PATCH v2 3/6] mm: rmap: add a ZONE_DEVICE folio warning in folio_referenced() Baolin Wang
2026-02-27  9:44 ` [PATCH v2 4/6] mm: add a batched helper to clear the young flag for large folios Baolin Wang
2026-02-27  9:44 ` [PATCH v2 5/6] mm: support batched checking of the young flag for MGLRU Baolin Wang
2026-02-27  9:44 ` [PATCH v2 6/6] arm64: mm: implement the architecture-specific test_and_clear_young_ptes() Baolin Wang

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