Re: [PATCH v2 1/2] mm/huge_memory: use folio's memcg inside __folio_split()
From: Johannes Weiner
Date: Sat Aug 01 2026 - 03:01:18 EST
On Thu, Jul 30, 2026 at 10:18:00PM -0400, Zi Yan wrote:
> During a pagecache folio split, an xarray node allocation can happen and
> needs to charge at folio's memcg instead of folio split invoker's memcg,
> because for example folio split can happen during reclaim and reclaim's
> active memcg might not be folio's memcg. Switch to folio's memcg at the
> beginning and switch back afterwards.
>
> Suggested-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> Fixes: 6b24ca4a1a8d4 ("mm: Use multi-index entries in the page cache")
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>