From: Alexandre Ghiti <alex@ghiti.fr>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosry@kernel.org>, Nhat Pham <nphamcs@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Christoph Hellwig <hch@lst.de>, Chris Li <chrisl@kernel.org>,
Kairui Song <kasong@tencent.com>
Subject: [PATCH 0/2] mm/zswap: batch the writeback IO
Date: Wed, 7 Oct 2026 17:34:42 +0200 [thread overview]
Message-ID: <20261007153507.50715-1-alex@ghiti.fr> (raw)
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
next reply other threads:[~2026-10-07 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 15:34 Alexandre Ghiti [this message]
2026-10-07 15:34 ` [PATCH 1/2] mm/zswap: batch the writeback IO of consecutive entries Alexandre Ghiti
2026-10-09 6:34 ` Nhat Pham
2026-10-07 15:34 ` [PATCH 2/2] mm/zswap: plug the writeback IO of an LRU walk Alexandre Ghiti
2026-10-09 6:36 ` Nhat Pham
2026-10-08 10:04 ` [PATCH 0/2] mm/zswap: batch the writeback IO Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261007153507.50715-1-alex@ghiti.fr \
--to=alex@ghiti.fr \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=chrisl@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosry@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®