Re: [PATCH] mm/slub: disable slab merging in the default configuration

From: Roman Gushchin
Date: Wed Jun 28 2023 - 12:45:13 EST


On Tue, Jun 27, 2023 at 12:32:15PM -0700, David Rientjes wrote:
> On Tue, 27 Jun 2023, Julian Pidancet wrote:
>
> > Make CONFIG_SLAB_MERGE_DEFAULT default to n unless CONFIG_SLUB_TINY is
> > enabled. Benefits of slab merging is limited on systems that are not
> > memory constrained: the overhead is negligible and evidence of its
> > effect on cache hotness is hard to come by.
> >
>
> I don't have an objection to this, I think it makes sense.

+1

I believe the overhead was much larger when we had per-memcg slab caches,
but now it should be fairly small on most systems.

But I wonder if we need a new flag (SLAB_MERGE?) to explicitly force merging
on per-slab cache basis. I believe there are some cases when slab caches can
be created in noticeable numbers and in those cases the memory footprint might
be noticeable.

Thanks!