Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-16 Thread Zhan Jianyu
On Wed, Apr 16, 2014 at 5:22 PM, Michal Hocko wrote: > cannot say I like the new code much more than the previous one and > I've never seen the old one being a bottleneck. So I am not entirely > fond of optimization without a good reason. (Hint, if you are optimizing > something always show us

Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-16 Thread Michal Hocko
On Fri 11-04-14 01:11:08, Jianyu Zhan wrote: > Currently, mem_cgroup_read_stat() is used for user interface. The > user accounts memory usage by memory cgroup and he _always_ requires > exact value because he accounts memory. So we don't use quick-and-fuzzy > -read-and-do-periodic-synchronization

Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-16 Thread Michal Hocko
On Fri 11-04-14 01:11:08, Jianyu Zhan wrote: Currently, mem_cgroup_read_stat() is used for user interface. The user accounts memory usage by memory cgroup and he _always_ requires exact value because he accounts memory. So we don't use quick-and-fuzzy -read-and-do-periodic-synchronization way.

Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-16 Thread Zhan Jianyu
On Wed, Apr 16, 2014 at 5:22 PM, Michal Hocko mho...@suse.cz wrote: cannot say I like the new code much more than the previous one and I've never seen the old one being a bottleneck. So I am not entirely fond of optimization without a good reason. (Hint, if you are optimizing something always

Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-14 Thread Johannes Weiner
Hi Jianyu, On Fri, Apr 11, 2014 at 01:11:08AM +0800, Jianyu Zhan wrote: > Currently, mem_cgroup_read_stat() is used for user interface. The > user accounts memory usage by memory cgroup and he _always_ requires > exact value because he accounts memory. So we don't use quick-and-fuzzy >

Re: [PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-14 Thread Johannes Weiner
Hi Jianyu, On Fri, Apr 11, 2014 at 01:11:08AM +0800, Jianyu Zhan wrote: Currently, mem_cgroup_read_stat() is used for user interface. The user accounts memory usage by memory cgroup and he _always_ requires exact value because he accounts memory. So we don't use quick-and-fuzzy

[PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-10 Thread Jianyu Zhan
Currently, mem_cgroup_read_stat() is used for user interface. The user accounts memory usage by memory cgroup and he _always_ requires exact value because he accounts memory. So we don't use quick-and-fuzzy -read-and-do-periodic-synchronization way. Thus, we iterate all cpus for one read. And we

[PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-10 Thread Jianyu Zhan
Currently, mem_cgroup_read_stat() is used for user interface. The user accounts memory usage by memory cgroup and he _always_ requires exact value because he accounts memory. So we don't use quick-and-fuzzy -read-and-do-periodic-synchronization way. Thus, we iterate all cpus for one read. And we