Tejun Heo
574bd9f7c7
cgroup: implement generic child / descendant walk macros
...
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@kernel.org >
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujisu.com >
Reviewed-by: Michal Hocko <mhocko@suse.cz >
Acked-by: Li Zefan <lizefan@huawei.com >
2012-11-09 09:12:29 -08:00
..
2012-10-02 17:26:42 -07:00
2012-10-09 15:04:25 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-08 06:38:18 +09:00
2012-10-02 18:01:25 +01:00
2012-10-17 10:00:29 -03:00
2012-10-09 09:48:44 +01:00
2012-10-11 10:27:51 +09:00
2012-10-19 16:12:38 +01:00
2012-10-02 17:16:10 -07:00
2012-10-17 12:31:15 +01:00
2012-10-23 16:32:16 +09:00
2012-10-17 12:31:15 +01:00
2012-10-09 15:04:25 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-03 13:45:43 -07:00
2012-10-13 11:27:59 +09:00
2012-10-07 17:29:24 +09:00
2012-10-09 09:49:02 +01:00
2012-10-24 18:00:17 -07:00
2012-10-17 12:31:15 +01:00
2012-10-17 12:31:15 +01:00
2012-10-13 14:15:08 -07:00
2012-10-17 12:31:15 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-08 13:50:19 +10:30
2012-10-08 13:50:20 +10:30
2012-10-08 13:50:19 +10:30
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:46 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-11-09 09:12:29 -08:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:51 +09:00
2012-10-10 12:02:25 +09:00
2012-10-12 10:27:27 +09:00
2012-10-13 10:46:48 +01:00
2012-10-12 06:37:36 -05:00
2012-10-19 14:07:47 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-02 18:32:35 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-02 18:01:25 +01:00
2012-10-24 15:57:14 -07:00
2012-10-13 10:46:48 +01:00
2012-10-16 18:49:15 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-22 11:28:10 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-26 14:27:49 -07:00
2012-10-16 13:37:17 -04:00
2012-10-13 10:46:48 +01:00
2012-10-12 00:32:03 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-06 03:04:57 +09:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:23:01 +09:00
2012-11-02 12:44:51 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:23:02 +09:00
2012-10-06 13:14:36 +02:00
2012-10-13 10:46:48 +01:00
2012-10-05 22:23:54 +02:00
2012-10-05 22:23:51 +02:00
2012-10-06 13:43:38 +02:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-06 03:04:56 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-06 03:04:37 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:40 +09:00
2012-10-09 16:22:39 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-12 22:17:48 +09:00
2012-10-13 10:46:48 +01:00
2012-10-17 12:31:15 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-08 13:49:48 +10:30
2012-10-13 10:46:48 +01:00
2012-10-31 20:36:30 -02:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-10 20:14:07 +09:00
2012-10-10 01:15:44 -04:00
2012-10-02 19:01:32 -07:00
2012-10-06 02:48:09 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-24 11:52:21 -07:00
2012-10-11 08:50:16 +09:00
2012-10-09 16:23:02 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:39 +09:00
2012-10-09 16:22:54 +09:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:58 +09:00
2012-10-09 16:23:00 +09:00
2012-10-01 18:02:07 -07:00
2012-10-10 20:00:55 +10:30
2012-10-08 13:50:21 +10:30
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-01 15:33:33 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-02 14:56:19 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-17 15:53:01 -05:00
2012-10-17 15:53:02 -05:00
2012-10-10 22:41:05 -04:00
2012-10-17 15:53:00 -05:00
2012-10-08 13:50:18 +10:30
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:52 +09:00
2012-10-11 08:50:14 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-05 22:23:53 +02:00
2012-10-13 10:46:48 +01:00
2012-10-28 10:59:36 -07:00
2012-10-06 03:04:44 +09:00
2012-10-24 10:01:59 +02:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-19 14:07:47 -07:00
2012-10-13 10:46:48 +01:00
2012-10-02 18:32:35 -07:00
2012-10-13 10:46:48 +01:00
2012-10-03 13:52:52 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-05 09:26:01 -07:00
2012-10-25 14:37:52 -07:00
2012-10-09 16:22:40 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-06 03:05:21 +09:00
2012-10-11 08:50:16 +09:00
2012-10-09 16:22:43 +09:00
2012-10-06 03:05:01 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-11 20:02:04 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-07 00:40:54 -04:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:55 +09:00
2012-10-13 10:46:48 +01:00
2012-10-12 13:35:07 -04:00
2012-10-13 10:46:48 +01:00
2012-10-22 15:16:06 -04:00
2012-10-13 10:46:48 +01:00
2012-10-09 16:22:32 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-07 21:19:42 +02:00
2012-10-17 11:16:13 -07:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-09 11:24:47 +01:00
2012-10-09 16:22:59 +09:00
2012-10-09 16:22:59 +09:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00
2012-10-13 10:46:48 +01:00