On Wed, Nov 25, 2026 at 09:37:04PM +0000, Harry Yoo (Meta) wrote:
> XArrays with XA_FLAGS_ACCOUNT (e.g. the page cache) allocate nodes with > __GFP_ACCOUNT, and xarray/IDR callers can also pass GFP_KERNEL_ACCOUNT > directly. Specify SLAB_MAY_ACCOUNT when the object may be charged to a > memcg. __GFP_ACCOUNT without SLAB_MAY_ACCOUNT will not be allowed. > > Path: __filemap_add_folio() (i_pages has XA_FLAGS_ACCOUNT) > -> xas_store() -> xas_alloc() (gfp |= __GFP_ACCOUNT) > -> kmem_cache_alloc_lru(radix_tree_node_cachep) > > Cc: Matthew Wilcox <wil…@infradead.org> > Cc: linu…@vger.kernel.org > Signed-off-by: Harry Yoo (Meta) <har…@kernel.org> > --- > lib/radix-tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >
Looks good to me. Reviewed-by: Hao Li <hao…@linux.dev>
-- Thanks, Hao