From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,youngjun.park@lge.com,shikemeng@huaweicloud.com,nphamcs@gmail.com,kasong@tencent.com,joshua.hahnjy@gmail.com,hch@lst.de,chrisl@kernel.org,baoquan.he@linux.dev,baohua@kernel.org,alex@ghiti.fr,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-swap-submit-the-last-readahead-batch-before-unplugging.patch removed from -mm tree
Date: Sat, 24 Oct 2026 02:00:43 -0700 [thread overview]
Message-ID: <20261024090043.9D9451F01825@smtp.kernel.org> (raw)
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
reply other threads:[~2026-10-24 9:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261024090043.9D9451F01825@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=baohua@kernel.org \
--cc=baoquan.he@linux.dev \
--cc=chrisl@kernel.org \
--cc=hch@lst.de \
--cc=joshua.hahnjy@gmail.com \
--cc=kasong@tencent.com \
--cc=mm-commits@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=shikemeng@huaweicloud.com \
--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 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.