Re: [PATCH v2 1/2] mm/huge_memory: use folio's memcg inside __folio_split()

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

On 7/31/26 10:18 AM, 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 <[email protected]>
> Fixes: 6b24ca4a1a8d4 ("mm: Use multi-index entries in the page cache")
> Signed-off-by: Zi Yan <[email protected]>
> ---

LGTM.
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.