Re: [PATCH] memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT

From: Michal Hocko
Date: Thu Oct 14 2021 - 03:18:16 EST


On Thu 14-10-21 10:05:21, Vasily Averin wrote:
[...]
> > + /* Bulk allocator does not support memcg accounting. */
> > + if (unlikely(gfp & __GFP_ACCOUNT))
> > + goto out;
> > +
>
> May be (memcg_kmem_enabled() && (gfp & __GFP_ACCOUNT)) check is better here?

Yes please

--
Michal Hocko
SUSE Labs