Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 16:47), Glauber Costa wrote: On 10/11/2012 05:40 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:16, Glauber Costa wrote: We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 16:47), Glauber Costa wrote: On 10/11/2012 05:40 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:16, Glauber Costa wrote: We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-12 Thread Glauber Costa
On 10/11/2012 05:40 PM, Michal Hocko wrote: > On Mon 08-10-12 14:06:16, Glauber Costa wrote: >> We can use static branches to patch the code in or out when not used. >> >> Because the _ACTIVE bit on kmem_accounted is only set after the >> increment is done, we guarantee that the root memcg will

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-12 Thread Glauber Costa
On 10/11/2012 05:40 PM, Michal Hocko wrote: On Mon 08-10-12 14:06:16, Glauber Costa wrote: We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we guarantee that the root memcg will always be

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-11 Thread Michal Hocko
On Mon 08-10-12 14:06:16, Glauber Costa wrote: > We can use static branches to patch the code in or out when not used. > > Because the _ACTIVE bit on kmem_accounted is only set after the > increment is done, we guarantee that the root memcg will always be > selected for kmem charges until all

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-11 Thread Michal Hocko
On Mon 08-10-12 14:06:16, Glauber Costa wrote: We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we guarantee that the root memcg will always be selected for kmem charges until all call

[PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-08 Thread Glauber Costa
We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we guarantee that the root memcg will always be selected for kmem charges until all call sites are patched (see memcg_kmem_enabled). This

[PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-08 Thread Glauber Costa
We can use static branches to patch the code in or out when not used. Because the _ACTIVE bit on kmem_accounted is only set after the increment is done, we guarantee that the root memcg will always be selected for kmem charges until all call sites are patched (see memcg_kmem_enabled). This