Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-10 Thread Vladimir Davydov
On 12/10/2013 01:13 PM, Michal Hocko wrote: > On Mon 09-12-13 22:44:51, Vladimir Davydov wrote: >> On 12/09/2013 07:22 PM, Michal Hocko wrote: >>> On Wed 04-12-13 15:56:51, Vladimir Davydov wrote: On 12/04/2013 02:08 PM, Glauber Costa wrote: >>> Could you do something clever with just one

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-10 Thread Michal Hocko
On Mon 09-12-13 22:44:51, Vladimir Davydov wrote: > On 12/09/2013 07:22 PM, Michal Hocko wrote: > > On Wed 04-12-13 15:56:51, Vladimir Davydov wrote: > >> On 12/04/2013 02:08 PM, Glauber Costa wrote: > > Could you do something clever with just one flag? Probably yes. But I > > doubt it woul

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-09 Thread Vladimir Davydov
On 12/09/2013 07:22 PM, Michal Hocko wrote: > On Wed 04-12-13 15:56:51, Vladimir Davydov wrote: >> On 12/04/2013 02:08 PM, Glauber Costa wrote: > Could you do something clever with just one flag? Probably yes. But I > doubt it would > be that much cleaner, this is just the way that patc

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-09 Thread Michal Hocko
On Wed 04-12-13 15:56:51, Vladimir Davydov wrote: > On 12/04/2013 02:08 PM, Glauber Costa wrote: > >>> Could you do something clever with just one flag? Probably yes. But I > >>> doubt it would > >>> be that much cleaner, this is just the way that patching sites work. > >> Thank you for spending yo

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-04 Thread Vladimir Davydov
On 12/04/2013 02:08 PM, Glauber Costa wrote: >>> Could you do something clever with just one flag? Probably yes. But I >>> doubt it would >>> be that much cleaner, this is just the way that patching sites work. >> Thank you for spending your time to listen to me. >> > Don't worry! I thank you for c

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-04 Thread Glauber Costa
>> >> Could you do something clever with just one flag? Probably yes. But I >> doubt it would >> be that much cleaner, this is just the way that patching sites work. > > Thank you for spending your time to listen to me. > Don't worry! I thank you for carrying this forward. > Let me try to explain

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-03 Thread Vladimir Davydov
On 12/04/2013 02:38 AM, Glauber Costa wrote: >> In memcg_update_kmem_limit() we do the whole process of limit >> initialization under a mutex so the situation we need protection from in >> tcp_update_limit() is impossible. BTW once set, the 'activated' flag is >> never cleared and never checked alo

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-03 Thread Glauber Costa
>>> Hi, Glauber Hi. > > In memcg_update_kmem_limit() we do the whole process of limit > initialization under a mutex so the situation we need protection from in > tcp_update_limit() is impossible. BTW once set, the 'activated' flag is > never cleared and never checked alone, only along with the '

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-03 Thread Vladimir Davydov
On 12/03/2013 11:56 AM, Glauber Costa wrote: > On Mon, Dec 2, 2013 at 11:21 PM, Vladimir Davydov > wrote: >> On 12/02/2013 10:26 PM, Glauber Costa wrote: >>> On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: [CCing Glauber - please do so in other posts for kmem related changes]

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Glauber Costa
On Mon, Dec 2, 2013 at 11:21 PM, Vladimir Davydov wrote: > On 12/02/2013 10:26 PM, Glauber Costa wrote: >> >> On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: >>> >>> [CCing Glauber - please do so in other posts for kmem related changes] >>> >>> On Mon 02-12-13 17:08:13, Vladimir Davydov wrot

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Vladimir Davydov
On 12/02/2013 10:15 PM, Michal Hocko wrote: [CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b ("memcg: use static branches when code not in use") in order to gua

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Vladimir Davydov
On 12/02/2013 10:26 PM, Glauber Costa wrote: On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: [CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b ("memcg: us

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Glauber Costa
On Mon, Dec 2, 2013 at 10:51 PM, Michal Hocko wrote: > On Mon 02-12-13 22:26:48, Glauber Costa wrote: >> On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: >> > [CCing Glauber - please do so in other posts for kmem related changes] >> > >> > On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: >>

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Michal Hocko
On Mon 02-12-13 22:26:48, Glauber Costa wrote: > On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: > > [CCing Glauber - please do so in other posts for kmem related changes] > > > > On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: > >> The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a896

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Glauber Costa
On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko wrote: > [CCing Glauber - please do so in other posts for kmem related changes] > > On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: >> The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b ("memcg: >> use static branches when code not in use

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Michal Hocko
[CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: > The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b ("memcg: > use static branches when code not in use") in order to guarantee that > static_key_slow_inc(&memcg_km

[PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Vladimir Davydov
The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b ("memcg: use static branches when code not in use") in order to guarantee that static_key_slow_inc(&memcg_kmem_enabled_key) will be called only once for each memory cgroup when its kmem limit is set. The point is that at that time the m