Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg
From: Andrew Morton
Date: Thu Jul 05 2018 - 18:10:49 EST
On Wed, 4 Jul 2018 18:51:12 +0300 Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> wrote:
> > - why aren't we decreasing shrinker_nr_max in
> > unregister_memcg_shrinker()? That's easy to do, avoids pointless
> > work in shrink_slab_memcg() and avoids memory waste in future
> > prealloc_memcg_shrinker() calls.
> You sure, but there are some things. Initially I went in the same way
> as memcg_nr_cache_ids is made and just took the same x2 arithmetic.
> It never decreases, so it looked good to make shrinker maps like it.
> It's the only reason, so, it should not be a problem to rework.
> The only moment is Vladimir strongly recommends modularity, i.e.
> to have memcg_shrinker_map_size and shrinker_nr_max as different variables.
For what reasons?
> After the rework we won't be able to have this anymore, since memcontrol.c
> will have to know actual shrinker_nr_max value and it will have to be exported.
> Could this be a problem?