Re: [PATCH v4 13/17] mm/huge_memory: move memcg switch into the file split helper
From: Kiryl Shutsemau
Date: Wed Sep 09 2026 - 04:29:53 EST
On Tue, Sep 08, 2026 at 02:12:17AM +0800, Kairui Song via B4 Relay wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> The xarray node allocations in __folio_freeze_split_file() need
> to be charged to the folio's memcg, so move the memcg switch from
> __folio_split() into the helper.
>
> The anon split helper and the after-split folio freeing perform no
> chargeable allocations, so no memcg handling is left in __folio_split().
> Rename its out_no_memcg label to out.
>
> Acked-by: Zi Yan <ziy@xxxxxxxxxx>
> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> Reviewed-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
--
Kiryl Shutsemau / Kirill A. Shutemov