* [merged mm-stable] mm-swap-submit-the-last-readahead-batch-before-unplugging.patch removed from -mm tree
@ 2026-10-24 9:00 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-24 9:00 UTC (permalink / raw)
To: mm-commits, youngjun.park, shikemeng, nphamcs, kasong,
joshua.hahnjy, hch, chrisl, baoquan.he, baohua, alex, akpm
The quilt patch titled
Subject: mm/swap: submit the last readahead batch before unplugging
has been removed from the -mm tree. Its filename was
mm-swap-submit-the-last-readahead-batch-before-unplugging.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Alexandre Ghiti <alex@ghiti.fr>
Subject: mm/swap: submit the last readahead batch before unplugging
Date: Thu, 1 Oct 2026 10:57:12 +0200
Since block swap I/O is batched in struct swap_iocb, swap_add_folio() only
appends a folio to the pending batch when its slot directly follows the
previous one, and submits the pending batch otherwise. Batches submitted
inside the readahead loop go through the plug, where the block layer can
still merge them, but the final batch is submitted after blk_finish_plug()
and always becomes a separate request.
So submit the final batch before finishing the plug.
Link: https://lore.kernel.org/20261001085730.2029773-1-alex@ghiti.fr
Fixes: dda8fb68b590 ("mm/swap: also use struct swap_iocb for block I/O")
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: Barry Song <baohua@kernel.org>
Cc: Youngjun Park <youngjun.park@lge.com>
---
mm/swap_state.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/swap_state.c~mm-swap-submit-the-last-readahead-batch-before-unplugging
+++ a/mm/swap_state.c
@@ -906,8 +906,8 @@ struct folio *swap_cluster_readahead(swp
continue;
folio_put(folio);
}
- blk_finish_plug(&plug);
swap_read_submit(&ctx);
+ blk_finish_plug(&plug);
skip:
return swap_cache_read_folio_sync(entry, gfp_mask, mpol, ilx);
}
@@ -1019,8 +1019,8 @@ static struct folio *swap_vma_readahead(
}
if (pte)
pte_unmap(pte);
- blk_finish_plug(&plug);
swap_read_submit(&ctx);
+ blk_finish_plug(&plug);
skip:
/* The folio was likely read above, so no need for plugging here */
return swap_cache_read_folio_sync(targ_entry, gfp_mask, mpol, targ_ilx);
_
Patches currently in -mm which might be from alex@ghiti.fr are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-24 9:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 9:00 [merged mm-stable] mm-swap-submit-the-last-readahead-batch-before-unplugging.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.