From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, Chengming Zhou <chengming.zhou@linux.dev>,
Johannes Weiner <hannes@cmpxchg.org>,
Kairui Song <kasong@tencent.com>, Nhat Pham <nphamcs@gmail.com>,
Yosry Ahmed <yosryahmed@google.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: [PATCH v3 0/3] mm: zswap: optimize zswap invalidate and store
Date: Thu, 10 Sep 2026 20:35:41 +0800 [thread overview]
Message-ID: <20260910123544.818146-1-wangkefeng.wang@huawei.com> (raw)
This series range-ifies zswap_invalidate() to skip xarray lookups
when zswap is unused, and reuses it in zswap_store() to eliminate
redundant per-slot lookups and open-coded logic.
v3:
- make zswap_invalidate() to take nr_entries and add
zswap_never_enabled() into it
- since all patches refreshed, so no ACK/RB added
v2:
- split patches and refactor zswap_invalidate(), suggested by
Johannes Weiner
- add patch4 to skip zswap_invalidate() in swap_range_free()
Kefeng Wang (3):
mm: zswap: convert zswap_invalidate() to take a range
mm: zswap: skip xarray walk in zswap_invalidate() when zswap is unused
mm: zswap: reuse zswap_invalidate() in zswap_store()
include/linux/zswap.h | 8 ++++++--
mm/swapfile.c | 4 +---
mm/zswap.c | 45 ++++++++++++++++++++++---------------------
3 files changed, 30 insertions(+), 27 deletions(-)
--
2.55.0
next reply other threads:[~2026-09-10 12:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 12:35 Kefeng Wang [this message]
2026-09-10 12:35 ` [PATCH v3 1/3] mm: zswap: convert zswap_invalidate() to take a range Kefeng Wang
2026-09-10 14:08 ` Yosry Ahmed
2026-09-10 19:32 ` Johannes Weiner
2026-09-10 12:35 ` [PATCH v3 2/3] mm: zswap: skip xarray walk in zswap_invalidate() when zswap is unused Kefeng Wang
2026-09-10 14:08 ` Yosry Ahmed
2026-09-10 19:32 ` Johannes Weiner
2026-09-10 12:35 ` [PATCH v3 3/3] mm: zswap: reuse zswap_invalidate() in zswap_store() Kefeng Wang
2026-09-10 14:09 ` Yosry Ahmed
2026-09-10 19:33 ` Johannes Weiner
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=20260910123544.818146-1-wangkefeng.wang@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosryahmed@google.com \
/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