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

From: Kamezawa Hiroyuki
Date: Fri Feb 15 2013 - 03:13:50 EST


(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 references here. One for the returned memcg - which will be
released either by mem_cgroup_iter_break or a next iteration round
(where it would be prev) and the other is for last_visited which is
released when a new memcg is cached.

Sure.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/