[PATCH 0/2] mm/zswap: batch the writeback IO
From: Alexandre Ghiti
Date: Wed Oct 07 2026 - 12:00:12 EST
Since commit 8f29aa226f82 ("mm/swap: introduce struct swap_io_ctx"),
reclaim merges the swap writes of folios with consecutive slots into a
single bio, but zswap writeback still issues one IO per entry. Patch 1
makes each zswap LRU walk batch its writeback IO. Patch 2 plugs the
walk, so that the block layer can merge what the batch cannot.
Kernel build (defconfig, -j4) in a 600M memory.max cgroup with the zswap
shrinker enabled, swapping to an NVMe partition with iocost enabled,
next to a sibling fio random writer with 10 times its io.weight. Mean
+- stddev:
before after
patch 1 build time (s) 2269 +- 50 2203 +- 62
pages per request 1.08 +- 0.00 1.30 +- 0.02
patch 2 build time (s) 2188 +- 45 2104 +- 75
pages per request 1.30 +- 0.01 1.35 +- 0.02
Alexandre Ghiti (2):
mm/zswap: batch the writeback IO of consecutive entries
mm/zswap: plug the writeback IO of an LRU walk
mm/zswap.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 43 insertions(+), 11 deletions(-)
base-commit: 3fa97dbf7e37bff1e4dbe8bfd026c1b4a13e186e
--
2.53.0-Meta