Re: [PATCH v5 00/17] mm/huge_memory: clean up and decouple the anon and file split helpers

From: Andrew Morton

Date: Mon Sep 14 2026 - 20:47:25 EST


On Tue, 15 Sep 2026 01:14:41 +0800 Kairui Song via B4 Relay <devnull+kasong.tencent.com@xxxxxxxxxx> wrote:

> The folio split path handles anon, page cache and swap cache folios in
> one routine. That mixing is what makes the swap cache split
> restrictions hard to lift and to review. We now support uniform split to
> order-0 only, and no mappingless swap cache folios. And it has left a fair
> number of dead or redundant checks behind.
>
> This series prepares for lifting those restrictions by cleaning up the
> code first: split the routine into an anon and a file helper, and keep
> all swap cache handling in the anon helper. The file helper never sees
> a swap cache folio, folio_check_splittable() rejects them up front.
>
> Apart from two bug fixes (patch 1 and 2) and a slight adjustment of anon
> splitting (patch 12), this is a pure cleanup.

Thanks, all queued up in mm.git's mm-new branch.