Re: [PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-12 Thread Vladimir Davydov
On Fri, Sep 12, 2014 at 10:10:52AM +0900, Kamezawa Hiroyuki wrote: > (2014/09/12 0:41), Vladimir Davydov wrote: > > In the next patch I need a quick way to get a value of > > MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is > > slow (iterates over all cpus) and may sleep (uses

Re: [PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-12 Thread Vladimir Davydov
On Fri, Sep 12, 2014 at 10:10:52AM +0900, Kamezawa Hiroyuki wrote: (2014/09/12 0:41), Vladimir Davydov wrote: In the next patch I need a quick way to get a value of MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is slow (iterates over all cpus) and may sleep (uses

Re: [PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-11 Thread Kamezawa Hiroyuki
(2014/09/12 0:41), Vladimir Davydov wrote: > In the next patch I need a quick way to get a value of > MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is > slow (iterates over all cpus) and may sleep (uses get/put_online_cpus), > so it's a no-go. > > This patch converts memory

[PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-11 Thread Vladimir Davydov
In the next patch I need a quick way to get a value of MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is slow (iterates over all cpus) and may sleep (uses get/put_online_cpus), so it's a no-go. This patch converts memory cgroup statistics to use percpu_counter so that

Re: [PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-11 Thread Kamezawa Hiroyuki
(2014/09/12 0:41), Vladimir Davydov wrote: In the next patch I need a quick way to get a value of MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is slow (iterates over all cpus) and may sleep (uses get/put_online_cpus), so it's a no-go. This patch converts memory cgroup

[PATCH RFC 1/2] memcg: use percpu_counter for statistics

2014-09-11 Thread Vladimir Davydov
In the next patch I need a quick way to get a value of MEM_CGROUP_STAT_RSS. The current procedure (mem_cgroup_read_stat) is slow (iterates over all cpus) and may sleep (uses get/put_online_cpus), so it's a no-go. This patch converts memory cgroup statistics to use percpu_counter so that