mm-vmscan-avoid-pointless-large-folio-splits-without-swap.patch removed from -mm tree
The quilt patch titled
Subject: mm/vmscan: avoid pointless large folio splits without swap
has been removed from the -mm tree. Its filename was
mm-vmscan-avoid-pointless-large-folio-splits-without-swap.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: "Barry Song (Xiaomi)" <[email protected]>
Subject: mm/vmscan: avoid pointless large folio splits without swap
Date: Sun, 30 Aug 2026 12:29:19 +0800
When swap is disabled, exhausted, or unavailable due to memcg swap limits, splitting a large anonymous folio cannot make swapout progress. The fallback only destroys the large folio and inflates split statistics.
Use -E2BIG from folio_alloc_swap() as the explicit signal that splitting the folio might allow swapout of smaller pieces. For other allocation failures, keep the existing activation path and avoid the split.
This preserves the split fallback for fragmented or partially available swap, while avoiding it when there is no backing space for any part of the folio.
---
mm/vmscan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-avoid-pointless-large-folio-splits-without-swap +6 -1
@@ -1259,6 +1259,8 @@ retry:*/ if (folio_test_anon (folio) &&folio_test_swapbacked (folio) && !folio_test_swapcache (folio)) { +int ret; +if (!(sc->gfp_mask & __GFP_IO)) goto keep_locked;if (folio_maybe_dma_pinned (folio))
@@ -1277,11 +1279,14 @@ retry: split_folio_to_list(folio, folio_list)) goto activate_locked; } -if (folio_alloc_swap (folio)) { + ret =folio_alloc_swap (folio); +if (ret) {int __maybe_unused order =folio_order (folio);if (!folio_test_large (folio)) goto activate_locked_split; +if (ret != -E2BIG ) + goto activate_locked;/* Fallback to swap normal pages */ if (split_folio_to_list (folio, folio_list)) goto activate_locked;
_
Patches currently in -mm which might be from [email protected] are
mm-mglru-restore-accidentally-removed-seq-max_seq-check.patch