Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] mm: clean up folio LRU and swap declarations
@ 2026-06-02  1:01 Jianyue Wu
  2026-06-02  1:01 ` [PATCH v3 1/3] mm/swap: colocate page-cluster sysctl with swap readahead Jianyue Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jianyue Wu @ 2026-06-02  1:01 UTC (permalink / raw)
  To: Andrew Morton, Chris Li, Kairui Song, Kemeng Shi, Nhat Pham,
	Baoquan He, Barry Song, Youngjun Park, Qi Zheng, Shakeel Butt,
	Axel Rasmussen, Yuanchu Xie, Wei Xu, Johannes Weiner,
	David Hildenbrand, Michal Hocko, Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	Hugh Dickins, Baolin Wang
  Cc: linux-mm, linux-kernel, Jianyue Wu

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

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

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@lst.de

Signed-off-by: Jianyue Wu <wujianyue000@gmail.com>
---
Changes in v3:
- Update MAINTAINERS and documentation after mm/swap.c rename to
  mm/folio_lru.c (per David Hildenbrand's review)
- Move swap_readahead_setup() prototype from include/linux/swap.h to
  mm/swap.h (per Barry Song's review).  swap_readahead_setup() is only
  used inside mm/, and mm/vmscan.c already includes mm/swap.h.
- Add a CONFIG_SWAP=n stub for swap_readahead_setup(), because
  swap_state.o is only built when CONFIG_SWAP is enabled while
  kswapd_init() is built unconditionally.
- Link to v2: https://lore.kernel.org/r/20260531-ch-swap-series-plus-folio-lru-cleanup-v2-0-1b9a4ac255b4@gmail.com

---
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

 Documentation/admin-guide/sysctl/vm.rst |  2 +-
 Documentation/core-api/mm-api.rst       |  2 +-
 MAINTAINERS                             |  3 +-
 include/linux/swap.h                    | 75 +++------------------------------
 mm/Makefile                             |  2 +-
 mm/{swap.c => folio_lru.c}              | 38 +----------------
 mm/internal.h                           | 65 ++++++++++++++++++++++++++++
 mm/memfd.c                              |  1 +
 mm/swap.h                               |  8 +++-
 mm/swap_state.c                         | 37 ++++++++++++++++
 mm/vmscan.c                             |  2 +-
 11 files changed, 121 insertions(+), 114 deletions(-)
---
base-commit: d7be408821acadd7d713d1da16a6742886799114
change-id: 20260531-ch-swap-series-plus-folio-lru-cleanup-d9781c8332dc

Best regards,
-- 
Jianyue Wu <wujianyue000@gmail.com>



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

end of thread, other threads:[~2026-06-03 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  1:01 [PATCH v3 0/3] mm: clean up folio LRU and swap declarations Jianyue Wu
2026-06-02  1:01 ` [PATCH v3 1/3] mm/swap: colocate page-cluster sysctl with swap readahead Jianyue Wu
2026-06-02  1:01 ` [PATCH v3 2/3] mm: move folio LRU code out of swap Jianyue Wu
2026-06-02 11:28   ` Baoquan He
2026-06-02 13:38     ` Jianyue Wu
2026-06-02 15:57   ` Matthew Wilcox
2026-06-03 10:49     ` Baoquan He
2026-06-02  1:01 ` [PATCH v3 3/3] mm: move reclaim-internal declarations out of swap.h Jianyue Wu

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