[RFC PATCH v2 0/2] mm: enable lru cache for smaller large folios
From: Barry Song (Xiaomi)
Date: Thu Jul 09 2026 - 04:20:26 EST
This patchset enables the per-CPU LRU cache for large folios smaller
than `COSTLY_ORDER`. It is particularly beneficial on systems that use
relatively small large folios. For larger folios, the benefit is likely
to be smaller because far fewer folios are expected to contend for the
LRU cache.
Patch 1/2 enables the per-CPU LRU cache for eligible large folios.
Patch 2/2 updates `__wp_can_reuse_large_anon_folio()` to account for
the fact that large folios may now also reside in the per-CPU LRU cache
before they are reused.
-RFC v2:
* Make __wp_can_reuse_large_anon_folio() aware of LRU-cached large
folios. As David pointed out, it currently does not account for
large folios residing in the per-CPU LRU cache.
Barry Song (Xiaomi) (2):
mm: allow smaller large folios to use lru_cache
mm: improve large folio reuse for LRU-cached folios
include/linux/swap.h | 4 ++--
mm/memory.c | 13 +++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
--
2.39.3 (Apple Git-146)