[PATCH v2 0/2] promote mapped executable folios after first usage for MGLRU

From: Baolin Wang

Date: Thu Jul 16 2026 - 06:46:53 EST


Now MGLRU's protection of mapped executable file folios is less reliable.
Follow the classical LRU's logic, promoting mapped executable file folios
after their first usage to give executable code a better chance to stay in
memory and improve workload performance (See patch 2 for more details).

Changes from v1:
- Add a new patch to clean up vma flags as preparation.
- Add a new helper to check exec file folios (per Kaisui).
- Promote exec file folios in lru_gen_set_refs (Per Sashiko).

Baolin Wang (2):
mm: vmscan: convert folio_referenced() to use vma_flags_t
mm: mglru: promote mapped executable folios after first usage

include/linux/mm_inline.h | 6 +++++
include/linux/rmap.h | 7 +++---
mm/rmap.c | 19 +++++++++------
mm/vmscan.c | 51 +++++++++++++++++++++++----------------
4 files changed, 50 insertions(+), 33 deletions(-)

--
2.47.3