Re: [RFC PATCH v5 3/4] mm/vmscan: avoid pointless large folio splits without swap
From: Barry Song
Date: Fri Aug 07 2026 - 19:24:27 EST
On Thu, Aug 6, 2026 at 9:58 PM David Hildenbrand (Arm) <david@xxxxxxxxxx> wrote:
>
> On 7/30/26 14:23, Xueyuan Chen wrote:
> > From: "Barry Song (Xiaomi)" <baohua@xxxxxxxxxx>
> >
> > 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.
> >
> > Reported-by: Nanzhe Zhao <zhaonanzhe@xxxxxxxxxx>
>
> Do you have a link to the report?
No. Nanzhe mentioned that to me verbally.
>
> I assume this is not Fixes-worthy.
>
[...]
>
> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>
> --
> Cheers,
>
> David