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

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 would be that much

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 flag? Probably

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

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

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 your time to

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 patching sites work.

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

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-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 what is

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 carrying this

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

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-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 vdavy...@parallels.com wrote: On 12/02/2013 10:26 PM, Glauber Costa wrote: On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko mho...@suse.cz wrote: [CCing Glauber - please do so in other posts for kmem

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 'active'

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 alone,

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

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

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:

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

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

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 >

[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(_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

[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

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

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-02 Thread Glauber Costa
On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko mho...@suse.cz 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

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 mho...@suse.cz 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

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

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

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 mho...@suse.cz 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

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

Re: [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

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