Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-06 Thread Vladimir Davydov
On Thu, Jul 05, 2018 at 03:10:30PM -0700, Andrew Morton wrote: > 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 mem

Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-06 Thread Vladimir Davydov
On Tue, Jul 03, 2018 at 01:50:00PM -0700, Andrew Morton wrote: > On Tue, 03 Jul 2018 18:09:26 +0300 Kirill Tkhai wrote: > > > Imagine a big node with many cpus, memory cgroups and containers. > > Let we have 200 containers, every container has 10 mounts, > > and 10 cgroups. All container tasks do

Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-05 Thread Matthew Wilcox
On Tue, Jul 03, 2018 at 01:50:00PM -0700, Andrew Morton wrote: > It should be possible to find the highest ID in an IDR tree with a > straightforward descent of the underlying radix tree, but I doubt if > that has been wired up. Otherwise a simple loop in > unregister_memcg_shrinker() woul

Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-05 Thread Andrew Morton
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,

Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-04 Thread Kirill Tkhai
On 03.07.2018 23:50, Andrew Morton wrote: > On Tue, 03 Jul 2018 18:09:26 +0300 Kirill Tkhai wrote: > >> Imagine a big node with many cpus, memory cgroups and containers. >> Let we have 200 containers, every container has 10 mounts, >> and 10 cgroups. All container tasks don't touch foreign >> con

Re: [PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-03 Thread Andrew Morton
On Tue, 03 Jul 2018 18:09:26 +0300 Kirill Tkhai wrote: > Imagine a big node with many cpus, memory cgroups and containers. > Let we have 200 containers, every container has 10 mounts, > and 10 cgroups. All container tasks don't touch foreign > containers mounts. If there is intensive pages write,

[PATCH v8 05/17] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-07-03 Thread Kirill Tkhai
Imagine a big node with many cpus, memory cgroups and containers. Let we have 200 containers, every container has 10 mounts, and 10 cgroups. All container tasks don't touch foreign containers mounts. If there is intensive pages write, and global reclaim happens, a writing task has to iterate over a