Re: [PATCH] mm: remove CONFIG_MEMCG_KMEM
From: Johannes Weiner
Date: Thu Mar 21 2024 - 09:33:45 EST
On Thu, Mar 21, 2024 at 01:58:18PM +0100, Michal Hocko wrote:
> On Wed 20-03-24 16:27:45, Johannes Weiner wrote:
> > CONFIG_MEMCG_KMEM used to be a user-visible option for whether slab
> > tracking is enabled. It has been default-enabled and equivalent to
> > CONFIG_MEMCG for almost a decade. We've only grown more kernel memory
> > accounting sites since, and there is no imaginable cgroup usecase
> > going forward that wants to track user pages but not the multitude of
> > user-drivable kernel allocations.
> >
> > Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
>
> But this
> > @@ -422,7 +422,7 @@ kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1];
> > #define KMALLOC_NOT_NORMAL_BITS \
> > (__GFP_RECLAIMABLE | \
> > (IS_ENABLED(CONFIG_ZONE_DMA) ? __GFP_DMA : 0) | \
> > - (IS_ENABLED(CONFIG_MEMCG_KMEM) ? __GFP_ACCOUNT : 0))
> > + (IS_ENABLED(CONFIG_KMEM) ? __GFP_ACCOUNT : 0))
>
> seems like a typo and should be CONFIG_MEMCG, right?
Ouch, good catch. IS_ENABLED() doesn't build warn on nonsense.
---