cpuset: Add comments for update_domain_attr_tree
PATCH 1/1 cpuset: Add comments for update_domain_attr_tree
Add comments for update_domain_attr_tree().
---
kernel/cpuset.c +9 -3
@@ -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;
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().Signed-off-by Lai Jiangshan <[email protected]>---
kernel/cpuset.c +9
-4@@ -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
业精于勤荒于嬉
Quoted 22 lines · Lai Jiangshan
This patch was reviewed by Li Zefan and was revised on his suggestion before sent. Thanks Li Zefan.
Reviewed-by Li Zefan <[email protected]>Quoted 15 lines · Lai Jiangshan
Add comments for
update_domain_attr_tree().Signed-off-by Lai Jiangshan <[email protected]>---
kernel/cpuset.c +0
-1@@ -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