[lkml]   [2018]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg
On Wed, 4 Jul 2018 18:51:12 +0300 Kirill Tkhai <> 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?


 \ /
  Last update: 2018-07-06 00:11    [W:0.091 / U:13.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site