[PATCH] cpuset: Add comments for update_domain_attr_tree

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lai Jiangshan
Date: Wednesday, July 30, 2008 - 7:22 pm

Add comments for update_domain_attr_tree().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index adf66c0..fed1f42 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -487,15 +487,21 @@ update_domain_attr(struct sched_domain_attr *dattr, struct cpuset *c)
 {
 	if (dattr->relax_domain_level < c->relax_domain_level)
 		dattr->relax_domain_level = c->relax_domain_level;
-	return;
 }
 
+/*
+ * Helper routine for rebuild_sched_domains().
+ * Walk the specified cpuset subtree and update @dattr with the
+ * largest relax_domain_level.
+ *
+ * Called with cgroup_mutex held.
+ */
 static void
-update_domain_attr_tree(struct sched_domain_attr *dattr, struct cpuset *c)
+update_domain_attr_tree(struct sched_domain_attr *dattr, struct cpuset *root)
 {
 	LIST_HEAD(q);
 
-	list_add(&c->stack_list, &q);
+	list_add(&root->stack_list, &q);
 	while (!list_empty(&q)) {
 		struct cpuset *cp;
 		struct cgroup *cont;


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] cpuset: Add comments for update_domain_attr_tree, Lai Jiangshan, (Wed Jul 30, 7:22 pm)