Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-27 Thread Kirill Tkhai
On 27.03.2018 13:00, Vladimir Davydov wrote: > On Mon, Mar 26, 2018 at 06:29:05PM +0300, Kirill Tkhai wrote: @@ -182,6 +187,9 @@ struct mem_cgroup { unsigned long low; unsigned long high; + /* Bitmap of shrinker ids suitable to call for this memcg */ + struct

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-27 Thread Vladimir Davydov
On Mon, Mar 26, 2018 at 06:29:05PM +0300, Kirill Tkhai wrote: > >> @@ -182,6 +187,9 @@ struct mem_cgroup { > >>unsigned long low; > >>unsigned long high; > >> > >> + /* Bitmap of shrinker ids suitable to call for this memcg */ > >> + struct shrinkers_map __rcu *shrinkers_map; > >> + > >

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-26 Thread Kirill Tkhai
On 24.03.2018 22:25, Vladimir Davydov wrote: > On Wed, Mar 21, 2018 at 04:21:40PM +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

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-24 Thread Vladimir Davydov
On Wed, Mar 21, 2018 at 04:21:40PM +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 w

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-23 Thread Kirill Tkhai
On 23.03.2018 12:06, kbuild test robot wrote: > Hi Kirill, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on mmotm/master] > [also build test WARNING on v4.16-rc6 next-20180322] > [if your patch is applied to the wrong git tree, please drop us a note to >

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-23 Thread kbuild test robot
Hi Kirill, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mmotm/master] [also build test WARNING on v4.16-rc6 next-20180322] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-22 Thread Kirill Tkhai
On 21.03.2018 20:54, Matthew Wilcox wrote: > On Wed, Mar 21, 2018 at 07:42:38PM +0300, Kirill Tkhai wrote: >> On 21.03.2018 19:20, Matthew Wilcox wrote: Sound great, thanks for explaining this. The big problem I see is that IDA/IDR add primitives allocate memory, while they will be used >

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Matthew Wilcox
On Wed, Mar 21, 2018 at 07:42:38PM +0300, Kirill Tkhai wrote: > On 21.03.2018 19:20, Matthew Wilcox wrote: > >> Sound great, thanks for explaining this. The big problem I see is > >> that IDA/IDR add primitives allocate memory, while they will be used > >> in the places, where they mustn't fail. Th

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Kirill Tkhai
On 21.03.2018 19:20, Matthew Wilcox wrote: > On Wed, Mar 21, 2018 at 06:43:01PM +0300, Kirill Tkhai wrote: >> On 21.03.2018 18:26, Matthew Wilcox wrote: >>> On Wed, Mar 21, 2018 at 06:12:17PM +0300, Kirill Tkhai wrote: On 21.03.2018 17:56, Matthew Wilcox wrote: > Why use your own bitmap he

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Matthew Wilcox
On Wed, Mar 21, 2018 at 06:43:01PM +0300, Kirill Tkhai wrote: > On 21.03.2018 18:26, Matthew Wilcox wrote: > > On Wed, Mar 21, 2018 at 06:12:17PM +0300, Kirill Tkhai wrote: > >> On 21.03.2018 17:56, Matthew Wilcox wrote: > >>> Why use your own bitmap here? Why not use an IDA which can grow and > >

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Kirill Tkhai
On 21.03.2018 18:26, Matthew Wilcox wrote: > On Wed, Mar 21, 2018 at 06:12:17PM +0300, Kirill Tkhai wrote: >> On 21.03.2018 17:56, Matthew Wilcox wrote: >>> Why use your own bitmap here? Why not use an IDA which can grow and >>> shrink automatically without you needing to play fun games with RCU?

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Matthew Wilcox
On Wed, Mar 21, 2018 at 06:12:17PM +0300, Kirill Tkhai wrote: > On 21.03.2018 17:56, Matthew Wilcox wrote: > > Why use your own bitmap here? Why not use an IDA which can grow and > > shrink automatically without you needing to play fun games with RCU? > > Bitmap allows to use unlocked set_bit()/c

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Kirill Tkhai
On 21.03.2018 17:56, Matthew Wilcox wrote: > On Wed, Mar 21, 2018 at 04:21:40PM +0300, Kirill Tkhai wrote: >> +++ b/include/linux/memcontrol.h >> @@ -151,6 +151,11 @@ struct mem_cgroup_thresholds { >> struct mem_cgroup_threshold_ary *spare; >> }; >> >> +struct shrinkers_map { >> +struct

Re: [PATCH 03/10] mm: Assign memcg-aware shrinkers bitmap to memcg

2018-03-21 Thread Matthew Wilcox
On Wed, Mar 21, 2018 at 04:21:40PM +0300, Kirill Tkhai wrote: > +++ b/include/linux/memcontrol.h > @@ -151,6 +151,11 @@ struct mem_cgroup_thresholds { > struct mem_cgroup_threshold_ary *spare; > }; > > +struct shrinkers_map { > + struct rcu_head rcu; > + unsigned long *map[0]; > +}