public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpuset: Add comments for update_domain_attr_tree
@ 2008-07-31  2:22 Lai Jiangshan
  2008-07-31  7:42 ` Lai Jiangshan
  0 siblings, 1 reply; 3+ messages in thread
From: Lai Jiangshan @ 2008-07-31  2:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Jackson, Paul Menage, Hidetoshi Seto, Li Zefan,
	Linux Kernel Mailing List


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;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpuset: Add comments for update_domain_attr_tree
  2008-07-31  2:22 [PATCH] cpuset: Add comments for update_domain_attr_tree Lai Jiangshan
@ 2008-07-31  7:42 ` Lai Jiangshan
  2008-08-04 16:27   ` Paul Menage
  0 siblings, 1 reply; 3+ messages in thread
From: Lai Jiangshan @ 2008-07-31  7:42 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Jackson, Paul Menage, Hidetoshi Seto, Li Zefan,
	Linux Kernel Mailing List


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

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>

Lai Jiangshan wrote:
> 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;
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 
> 


-- 
业精于勤荒于嬉



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpuset: Add comments for update_domain_attr_tree
  2008-07-31  7:42 ` Lai Jiangshan
@ 2008-08-04 16:27   ` Paul Menage
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Menage @ 2008-08-04 16:27 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: Andrew Morton, Paul Jackson, Hidetoshi Seto, Li Zefan,
	Linux Kernel Mailing List

On Thu, Jul 31, 2008 at 12:42 AM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
>
> This patch was reviewed by Li Zefan and was revised on his suggestion before sent.
> Thanks Li Zefan.
>
> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
>
> Lai Jiangshan wrote:
>> 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;
>>  }
>>
>> +/*

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-04 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31  2:22 [PATCH] cpuset: Add comments for update_domain_attr_tree Lai Jiangshan
2008-07-31  7:42 ` Lai Jiangshan
2008-08-04 16:27   ` Paul Menage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox