[PATCH v2 0/3] mm: clean up folio LRU and swap declarations

From: Jianyue Wu

Date: Sun May 31 2026 - 05:50:40 EST


This is a v2 of the previous single-patch cleanup:

https://lore.kernel.org/r/20260407110002.204755-1-wujianyue000@xxxxxxxxx

The previous version moved the folio LRU helpers out of mm/swap.c in
one step. Based on review feedback from Johannes, Baoquan and Barry,
split the cleanup into smaller steps:

- move the page-cluster sysctl next to swap readahead in mm/swap_state.c
- rename mm/swap.c to mm/folio_lru.c after the swap-specific bits move out
- move MM-internal reclaim declarations out of include/linux/swap.h

The first patch handles the swap-specific page-cluster state before the
file rename, so the rename commit only carries folio LRU code. The last
patch keeps the LRU helpers used outside mm/ in include/linux/swap.h and
moves the internal reclaim/workingset declarations to mm/internal.h.

This series is based on Christoph Hellwig's swap_ops series, which
moves swap I/O dispatch behind swap_ops and leaves mm/swap.c with less
swap-specific state. That makes the folio LRU cleanup more natural to
split out on top.

https://lore.kernel.org/r/20260528124559.2566481-1-hch@xxxxxx

Signed-off-by: Jianyue Wu <wujianyue000@xxxxxxxxx>
---
Jianyue Wu (3):
mm/swap: colocate page-cluster sysctl with swap readahead
mm: move folio LRU code out of swap
mm: move reclaim-internal declarations out of swap.h

include/linux/swap.h | 75 ++++------------------------------------------
mm/Makefile | 2 +-
mm/{swap.c => folio_lru.c} | 38 +----------------------
mm/internal.h | 66 ++++++++++++++++++++++++++++++++++++++++
mm/memfd.c | 1 +
mm/swap.h | 2 --
mm/swap_state.c | 37 +++++++++++++++++++++++
mm/vmscan.c | 2 +-
8 files changed, 113 insertions(+), 110 deletions(-)
---
base-commit: d7be408821acadd7d713d1da16a6742886799114
change-id: 20260531-ch-swap-series-plus-folio-lru-cleanup-d9781c8332dc

Best regards,
--
Jianyue Wu <wujianyue000@xxxxxxxxx>