Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mm/swap, zswap: fix stale zswap data and swap-in bugs
@ 2026-10-29 18:31 Kairui Song via B4 Relay
  2026-10-29 18:31 ` [PATCH 1/3] mm/zswap: drop the stale zswap entry of a zero folio Kairui Song via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kairui Song via B4 Relay @ 2026-10-29 18:31 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Chris Li, Kemeng Shi, Nhat Pham, Baoquan He,
	Barry Song, Youngjun Park, Yosry Ahmed, Chengming Zhou,
	Usama Arif, David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	Chuanhua Han, Johannes Weiner, Mani Tofigh, linux-kernel,
	Kairui Song, Josef Bacik, stable, Chris Mason

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>




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-29 21:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 18:31 [PATCH 0/3] mm/swap, zswap: fix stale zswap data and swap-in bugs Kairui Song via B4 Relay
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox