Re: [PATCH v4 2/6] memcg: rework mem_cgroup_iter to use cgroup iterators

2013-02-15 Thread Kamezawa Hiroyuki
(2013/02/15 17:11), Michal Hocko wrote: On Fri 15-02-13 17:03:09, KAMEZAWA Hiroyuki wrote: css_get(&curr->css); I'm sorry if I miss something... This curr is curr == memcg = mem_cgroup_from_css(css) <= already try_get() done. double refcounted ? Yes we get 2

Re: [PATCH v4 2/6] memcg: rework mem_cgroup_iter to use cgroup iterators

2013-02-15 Thread Michal Hocko
On Fri 15-02-13 17:03:09, KAMEZAWA Hiroyuki wrote: [...] > > @@ -1158,31 +1161,74 @@ struct mem_cgroup *mem_cgroup_iter(struct > > mem_cgroup *root, > > > > mz = mem_cgroup_zoneinfo(root, nid, zid); > > iter = &mz->reclaim_iter[reclaim->priority]; > > -

Re: [PATCH v4 2/6] memcg: rework mem_cgroup_iter to use cgroup iterators

2013-02-15 Thread Kamezawa Hiroyuki
(2013/02/14 22:26), Michal Hocko wrote: > mem_cgroup_iter curently relies on css->id when walking down a group > hierarchy tree. This is really awkward because the tree walk depends on > the groups creation ordering. The only guarantee is that a parent node > is visited before its children. > Examp