Re: [PATCH v4 00/21] Virtual Swap Space

From: Nhat Pham

Date: Wed Mar 18 2026 - 19:12:42 EST


On Wed, Mar 18, 2026 at 3:29 PM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>

[...]

Argh I copied my draft cover letter over the diffstat. My apologies -
here's the rest of the cover letter. Base commit is
05f7e89ab9731565d8a62e3b5d1ec206485eeb0b for your convenience (it's at
the bottom too - this should be 6.19).

Nhat Pham (21):
mm/swap: decouple swap cache from physical swap infrastructure
swap: rearrange the swap header file
mm: swap: add an abstract API for locking out swapoff
zswap: add new helpers for zswap entry operations
mm/swap: add a new function to check if a swap entry is in swap
cached.
mm: swap: add a separate type for physical swap slots
mm: create scaffolds for the new virtual swap implementation
zswap: prepare zswap for swap virtualization
mm: swap: allocate a virtual swap slot for each swapped out page
swap: move swap cache to virtual swap descriptor
zswap: move zswap entry management to the virtual swap descriptor
swap: implement the swap_cgroup API using virtual swap
swap: manage swap entry lifecycle at the virtual swap layer
mm: swap: decouple virtual swap slot from backing store
zswap: do not start zswap shrinker if there is no physical swap slots
swap: do not unnecesarily pin readahead swap entries
swapfile: remove zeromap bitmap
memcg: swap: only charge physical swap slots
swap: simplify swapoff using virtual swap
swapfile: replace the swap map with bitmaps
vswap: batch contiguous vswap free calls

Documentation/mm/swap-table.rst | 69 --
MAINTAINERS | 3 +-
include/linux/cpuhotplug.h | 1 +
include/linux/memcontrol.h | 6 +
include/linux/mm_types.h | 16 +
include/linux/shmem_fs.h | 7 +-
include/linux/swap.h | 185 ++-
include/linux/swap_cgroup.h | 13 -
include/linux/swapops.h | 25 +
include/linux/zswap.h | 17 +-
kernel/power/swap.c | 6 +-
mm/Makefile | 5 +-
mm/filemap.c | 14 +-
mm/huge_memory.c | 11 +-
mm/internal.h | 24 +-
mm/madvise.c | 2 +-
mm/memcontrol-v1.c | 6 +
mm/memcontrol.c | 144 ++-
mm/memory.c | 109 +-
mm/migrate.c | 13 +-
mm/mincore.c | 15 +-
mm/page_io.c | 83 +-
mm/shmem.c | 227 +---
mm/swap.h | 179 +--
mm/swap_cgroup.c | 172 ---
mm/swap_state.c | 306 +----
mm/swap_table.h | 78 +-
mm/swapfile.c | 1517 ++++-------------------
mm/userfaultfd.c | 18 +-
mm/vmscan.c | 28 +-
mm/vswap.c | 2008 +++++++++++++++++++++++++++++++
mm/zswap.c | 142 +--
32 files changed, 2942 insertions(+), 2507 deletions(-)
delete mode 100644 Documentation/mm/swap-table.rst
delete mode 100644 mm/swap_cgroup.c
create mode 100644 mm/vswap.c


base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b

--
2.52.0