[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <509CC91D.4050207@huawei.com>
Date: Fri, 9 Nov 2012 17:13:01 +0800
From: Li Zefan <lizefan@...wei.com>
To: Tejun Heo <tj@...nel.org>
CC: <mhocko@...e.cz>, <rjw@...k.pl>,
<containers@...ts.linux-foundation.org>, <cgroups@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>,
<fweisbec@...il.com>
Subject: Re: [PATCH 3/9 v2] cgroup: implement generic child / descendant walk
macros
On 2012/11/9 1:59, Tejun Heo wrote:
> Currently, cgroup doesn't provide any generic helper for walking a
> given cgroup's children or descendants. This patch adds the following
> three macros.
>
> * cgroup_for_each_child() - walk immediate children of a cgroup.
>
> * cgroup_for_each_descendant_pre() - visit all descendants of a cgroup
> in pre-order tree traversal.
>
> * cgroup_for_each_descendant_post() - visit all descendants of a
> cgroup in post-order tree traversal.
>
> All three only require the user to hold RCU read lock during
> traversal. Verifying that each iterated cgroup is online is the
> responsibility of the user. When used with proper synchronization,
> cgroup_for_each_descendant_pre() can be used to propagate state
> updates to descendants in reliable way. See comments for details.
>
> v2: s/config/state/ in commit message and comments per Michal. More
> documentation on synchronization rules.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujisu.com>
> Reviewed-by: Michal Hocko <mhocko@...e.cz>
I don't see anything wrong with the comment on cgroup_next_descendant_pre().
Acked-by: Li Zefan <lizefan@...wei.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists