Re: [PATCH][-mm] memcg : memory cgroup cpu hotplug support update.

KAMEZAWA Hiroyuki
2010-09-16T07:33:16Z

On Thu, 16 Sep 2010 16:17:27 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Thu, 16 Sep 2010 15:22:04 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > This naming is from mem_cgroup_walk_tree(). Now we have
> >
> > mem_cgroup_walk_tree();
> > mem_cgroup_walk_all();
> >
> > Rename both ? But it should be in separated patch.
> >
>
> Considering a bit ...but..
>
> #define for_each_mem_cgroup(mem) \
> for (mem = mem_cgroup_get_first(); \
> mem; \
> mem = mem_cgroup_get_next(mem);) \
>
> seems to need some helper functions. I'll consider about this clean up
> but it requires some amount of patch because css_get()/css_put()/rcu...etc..
> are problematic.

Hmm...css_put() at break from loop is a problem...

Do you have anything good idea to handle "exit-from-loop" operation
with dropping reference count ? I don't like "the caller must take care of"
approach.

Thanks,
-Kame