Re: [Devel] Race in memcg kmem?

2013-12-17 Thread Vladimir Davydov
On 12/12/2013 05:39 PM, Vladimir Davydov wrote: > On 12/12/2013 05:21 PM, Michal Hocko wrote: >> On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: >>> On 12/11/2013 03:13 AM, Glauber Costa wrote: On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov >> [...] > -- memcg_update_cache_size(s,

Re: [Devel] Race in memcg kmem?

2013-12-17 Thread Vladimir Davydov
On 12/12/2013 05:39 PM, Vladimir Davydov wrote: On 12/12/2013 05:21 PM, Michal Hocko wrote: On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: On 12/11/2013 03:13 AM, Glauber Costa wrote: On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov [...] -- memcg_update_cache_size(s, num_groups) --

Re: Race in memcg kmem?

2013-12-12 Thread Vladimir Davydov
On 12/12/2013 05:21 PM, Michal Hocko wrote: > On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: >> On 12/11/2013 03:13 AM, Glauber Costa wrote: >>> On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov > [...] -- memcg_update_cache_size(s, num_groups) -- grows s->memcg_params to accomodate

Re: Race in memcg kmem?

2013-12-12 Thread Michal Hocko
On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: > On 12/11/2013 03:13 AM, Glauber Costa wrote: > > On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov [...] > >> -- memcg_update_cache_size(s, num_groups) -- > >> grows s->memcg_params to accomodate data for num_groups memcg's > >> @s is the root

Re: Race in memcg kmem?

2013-12-12 Thread Michal Hocko
On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: On 12/11/2013 03:13 AM, Glauber Costa wrote: On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov [...] -- memcg_update_cache_size(s, num_groups) -- grows s-memcg_params to accomodate data for num_groups memcg's @s is the root cache whose

Re: Race in memcg kmem?

2013-12-12 Thread Vladimir Davydov
On 12/12/2013 05:21 PM, Michal Hocko wrote: On Wed 11-12-13 10:22:06, Vladimir Davydov wrote: On 12/11/2013 03:13 AM, Glauber Costa wrote: On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov [...] -- memcg_update_cache_size(s, num_groups) -- grows s-memcg_params to accomodate data for

Re: Race in memcg kmem?

2013-12-10 Thread Vladimir Davydov
On 12/11/2013 03:13 AM, Glauber Costa wrote: > On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov > wrote: >> Hi, >> >> Looking through the per-memcg kmem_cache initialization code, I have a >> bad feeling that it is prone to a race. Before getting to fixing it, I'd >> like to ensure this race is

Re: Race in memcg kmem?

2013-12-10 Thread Glauber Costa
On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov wrote: > Hi, > > Looking through the per-memcg kmem_cache initialization code, I have a > bad feeling that it is prone to a race. Before getting to fixing it, I'd > like to ensure this race is not only in my imagination. Here it goes. > > We keep

Race in memcg kmem?

2013-12-10 Thread Vladimir Davydov
Hi, Looking through the per-memcg kmem_cache initialization code, I have a bad feeling that it is prone to a race. Before getting to fixing it, I'd like to ensure this race is not only in my imagination. Here it goes. We keep per-memcg kmem caches in the memcg_params field of each root cache.

Re: Race in memcg kmem?

2013-12-10 Thread Glauber Costa
On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov vdavy...@parallels.com wrote: Hi, Looking through the per-memcg kmem_cache initialization code, I have a bad feeling that it is prone to a race. Before getting to fixing it, I'd like to ensure this race is not only in my imagination. Here it

Re: Race in memcg kmem?

2013-12-10 Thread Vladimir Davydov
On 12/11/2013 03:13 AM, Glauber Costa wrote: On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov vdavy...@parallels.com wrote: Hi, Looking through the per-memcg kmem_cache initialization code, I have a bad feeling that it is prone to a race. Before getting to fixing it, I'd like to ensure

Race in memcg kmem?

2013-12-10 Thread Vladimir Davydov
Hi, Looking through the per-memcg kmem_cache initialization code, I have a bad feeling that it is prone to a race. Before getting to fixing it, I'd like to ensure this race is not only in my imagination. Here it goes. We keep per-memcg kmem caches in the memcg_params field of each root cache.