Re: [RFC PATCH v5 3/4] mm/vmscan: avoid pointless large folio splits without swap

Baolin Wang <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm,gmane.linux.kernel.cgroups
Message-ID <[email protected]>

On 7/30/26 8:23 PM, Xueyuan Chen wrote:
> From: "Barry Song (Xiaomi)" <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Barry Song (Xiaomi) <[email protected]>
> Signed-off-by: Xueyuan Chen <[email protected]>
> ---

LGTM. Feel free to add:
Reviewed-by: Baolin Wang <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.