Re: [PATCH v2 0/2] mm/shrinker: make per-memcg shrinker units cheaper
From: Andrew Morton
Date: Wed Oct 14 2026 - 16:51:15 EST
On Wed, 14 Oct 2026 16:54:36 +0200 Konstantin Khorenko <khorenko@xxxxxxxxxxxxx> wrote:
> Every memory cgroup allocates, per NUMA node, one shrinker_info_unit
> per 64 memcg-aware shrinker ids up to shrinker_nr_max, whether or not it
> ever charges an object to those shrinkers. Every superblock registers
> such a shrinker, so the cost is
>
> memory cgroups x NUMA nodes x shrinker_nr_max / 64 x 1 KiB
>
> because the unit is 520 bytes and comes from kmalloc-1k.
So we could almost halve this just by using a dedicated kmem_cache?