Re: [PATCH 2/2] mm/zswap: plug the writeback IO of an LRU walk

From: Nhat Pham

Date: Fri Oct 09 2026 - 02:40:29 EST


On Wed, Oct 7, 2026 at 5:37 PM Alexandre Ghiti <alex@xxxxxxxx> wrote:
>
> zswap writeback only appends an entry to the pending bio when its slot
> directly follows the previous one, and submits the pending bio
> otherwise.
>
> Plug the LRU 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. It
> runs alone, and next to a sibling fio random writer with 10 times its
> io.weight so that iocost throttles it. Mean +- stddev, counters from the
> build's cgroup:
>
> Alone:
>
> unplugged plugged
> build time (s) 1061 +- 2 1057 +- 2 -0.4%
> write requests (k) 622 +- 34 579 +- 21 -6.8%
> pages per write request 1.30 +- 0.02 1.36 +- 0.05 +4.9%
> iocost debt (s) 14.0 +- 2.5 11.0 +- 1.7 -21.6%
> iocost wait (s) 7.7 +- 1.8 7.1 +- 1.1 -7.9%
> IO full pressure (s) 18.3 +- 1.4 17.5 +- 1.3 -4.5%
>
> Next to the writer:
>
> unplugged plugged
> build time (s) 2188 +- 45 2104 +- 75 -3.8%
> write requests (k) 594 +- 21 567 +- 24 -4.6%
> pages per write request 1.30 +- 0.01 1.35 +- 0.02 +3.6%
> iocost debt (s) 648 +- 22 645 +- 29 -0.5%
> iocost wait (s) 624 +- 23 633 +- 29 +1.5%
> IO full pressure (s) 615 +- 31 550 +- 44 -10.6%
>
> Signed-off-by: Alexandre Ghiti <alex@xxxxxxxx>

Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>