From: Kairui Song via B4 Relay <devnull+kasong.tencent.com@kernel.org>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Chris Li <chrisl@kernel.org>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
Barry Song <baohua@kernel.org>,
Youngjun Park <youngjun.park@lge.com>,
Yosry Ahmed <yosry@kernel.org>,
Chengming Zhou <chengming.zhou@linux.dev>,
Usama Arif <usamaarif642@gmail.com>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Chuanhua Han <hanchuanhua@oppo.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Mani Tofigh <mt4022@columbia.edu>,
linux-kernel@vger.kernel.org, Kairui Song <kasong@tencent.com>,
Josef Bacik <josef@toxicpanda.com>,
stable@vger.kernel.org, Chris Mason <mason@kernel.org>
Subject: [PATCH 0/3] mm/swap, zswap: fix stale zswap data and swap-in bugs
Date: Fri, 30 Oct 2026 02:31:40 +0800 [thread overview]
Message-ID: <20261030-swap-fixes-v1-0-73f73a59f2fc@tencent.com> (raw)
Hi all,
There are some bug fixes found by AI and collected by David, mostly
originally from Anthropic. After filtering and dropping a few that are
already being patched up by the community [1] [2], these are the 3 we
kept. I've reviewed them and they all look good to me, so please help
have a look and we can get them merged soon, they are pretty simple and
clean bug fixes patching real issues.
The zswap bug can return stale data instead of the zeroes that were
written, so it is data corruption and seems critical. The extent fix is
more urgent than it might look, as it can also read in unexpected data,
but the setup could be really rare. The accounting fix is minor.
The zswap and extent fixes affect stable kernels (v6.12+) and are marked
for stable. The accounting fix only affects v7.3+.
For the extent fix, in the long term we might actually want to detect
extent contiguity and allow mTHP swap-in for single-extent swap files.
We already disable mTHP allocation for swap files, so the current fix is
trivial. It seems the most minimal and correct one for now.
Optimization and cleanups can come later.
Link: https://lore.kernel.org/linux-mm/20261026-swapoff-writeok-v1-1-4f4cd420aa33@columbia.edu/ [1]
Link: https://lore.kernel.org/linux-mm/20260811132209.2862708-3-youngjun.park@lge.com/ [2]
Signed-off-by: Kairui Song <kasong@tencent.com>
---
Chris Mason (1):
mm, swap: fix large swap-in across swap file extents
Josef Bacik (2):
mm/zswap: drop the stale zswap entry of a zero folio
mm/swap: account synchronous swap reads as memory stall
mm/memory.c | 16 +++++++++++++---
mm/page_io.c | 17 +++++++++++++++++
2 files changed, 30 insertions(+), 3 deletions(-)
---
base-commit: 24d45a1475dd4c671feb1df705f67ef2fc293969
change-id: 20261030-swap-fixes-1aa6c2c1e7f9
Best regards,
--
Kairui Song <kasong@tencent.com>
next reply other threads:[~2026-10-29 18:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 18:31 Kairui Song via B4 Relay [this message]
2026-10-29 18:31 ` [PATCH 1/3] mm/zswap: drop the stale zswap entry of a zero folio Kairui Song via B4 Relay
2026-10-29 19:17 ` Johannes Weiner
2026-10-29 21:06 ` Nhat Pham
2026-10-29 21:15 ` Yosry Ahmed
2026-10-29 18:31 ` [PATCH 2/3] mm/swap: account synchronous swap reads as memory stall Kairui Song via B4 Relay
2026-10-29 21:00 ` Johannes Weiner
2026-10-29 18:31 ` [PATCH 3/3] mm, swap: fix large swap-in across swap file extents Kairui Song via B4 Relay
2026-10-29 21:21 ` Nhat Pham
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=20261030-swap-fixes-v1-0-73f73a59f2fc@tencent.com \
--to=devnull+kasong.tencent.com@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baoquan.he@linux.dev \
--cc=chengming.zhou@linux.dev \
--cc=chrisl@kernel.org \
--cc=david@kernel.org \
--cc=hanchuanhua@oppo.com \
--cc=hannes@cmpxchg.org \
--cc=josef@toxicpanda.com \
--cc=kasong@tencent.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mason@kernel.org \
--cc=mhocko@suse.com \
--cc=mt4022@columbia.edu \
--cc=nphamcs@gmail.com \
--cc=rppt@kernel.org \
--cc=shikemeng@huaweicloud.com \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=usamaarif642@gmail.com \
--cc=vbabka@kernel.org \
--cc=yosry@kernel.org \
--cc=youngjun.park@lge.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
all inboxes | Powered by JetHome®