Skip to contentSkip to conversation

cpuset: Add comments for update_domain_attr_tree

PATCH In review Lai Jiangshan 2 participants 3 messages Jul 31, 2008 – Aug 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpuset: Add comments for update_domain_attr_tree

Add comments for update_domain_attr_tree().

---

kernel/cpuset.c +9 -3
index adf66c0..fed1f42 100644
@@ -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;
author Reviewed-by Li Zefan on v1 1/1
#1 lore raw

This patch was reviewed by Li Zefan and was revised on his suggestion before sent. Thanks Li Zefan.

Quoted 43 lines · Lai Jiangshan

Add comments for update_domain_attr_tree().

---

kernel/cpuset.c +9 -4
index adf66c0..fed1f42 100644
@@ -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;
 
 
--

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

Signature · 1 line
业精于勤荒于嬉
#2 lore raw
Quoted 22 lines · Lai Jiangshan

This patch was reviewed by Li Zefan and was revised on his suggestion before sent. Thanks Li Zefan.

Quoted 15 lines · Lai Jiangshan

Add comments for update_domain_attr_tree().

---

kernel/cpuset.c +0 -1
index adf66c0..fed1f42 100644
@@ -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;
 }
 
Quoted 1 line

kernel/cpuset.c update_domain_attr(struct sched_domain_attr *dattr, struct cpuset *c) · line 492

Quoted 1 line
kernel/cpuset.c +1 -0
+/*

If you're going to add a comment block, maybe it's worth making it docbook-compatible? So /** at the start, and then following the proper docbook style conventions in kernel-doc-nano-HOWTO.txt ?

Paul