[PATCH -next] sched: fix cid_lock kernel-doc warnings

Randy Dunlap posted 1 patch 2 years, 9 months ago
There is a newer version of this series
kernel/sched/core.c |    4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH -next] sched: fix cid_lock kernel-doc warnings
Posted by Randy Dunlap 2 years, 9 months ago
Fix kernel-doc warnings for cid_lock and use_cid_lock.
These comments are not in kernel-doc format.

kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
 on line 11496 - I thought it was a doc line
kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
 on line 11505 - I thought it was a doc line

Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
---
 kernel/sched/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/kernel/sched/core.c b/kernel/sched/core.c
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -11492,7 +11492,7 @@ void call_trace_sched_update_nr_running(
 
 #ifdef CONFIG_SCHED_MM_CID
 
-/**
+/*
  * @cid_lock: Guarantee forward-progress of cid allocation.
  *
  * Concurrency ID allocation within a bitmap is mostly lock-free. The cid_lock
@@ -11501,7 +11501,7 @@ void call_trace_sched_update_nr_running(
  */
 DEFINE_RAW_SPINLOCK(cid_lock);
 
-/**
+/*
  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
  *
  * When @use_cid_lock is 0, the cid allocation is lock-free. When contention is
Re: [PATCH -next] sched: fix cid_lock kernel-doc warnings
Posted by Peter Zijlstra 2 years, 9 months ago
On Thu, Apr 27, 2023 at 08:11:11PM -0700, Randy Dunlap wrote:
> Fix kernel-doc warnings for cid_lock and use_cid_lock.
> These comments are not in kernel-doc format.
> 
> kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
>  on line 11496 - I thought it was a doc line
> kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>  on line 11505 - I thought it was a doc line
> 
> Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Blergh, so mostly I avoid kerneldoc like the plague; because then you
get random people doing 'fixups' that end up making the actual comment
unreadable garbage.

Mostly my answer to any such patch is to simply remove the extra * and
call it fixed.

But now the thing presumes to know better? :-(

Anyway, in this case I suppose we can add it on and see, there's still a
fair number of actual kerneldoc comments in that file.

>  kernel/sched/core.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff -- a/kernel/sched/core.c b/kernel/sched/core.c
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -11492,7 +11492,7 @@ void call_trace_sched_update_nr_running(
>  
>  #ifdef CONFIG_SCHED_MM_CID
>  
> -/**
> +/*
>   * @cid_lock: Guarantee forward-progress of cid allocation.
>   *
>   * Concurrency ID allocation within a bitmap is mostly lock-free. The cid_lock
> @@ -11501,7 +11501,7 @@ void call_trace_sched_update_nr_running(
>   */
>  DEFINE_RAW_SPINLOCK(cid_lock);
>  
> -/**
> +/*
>   * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>   *
>   * When @use_cid_lock is 0, the cid allocation is lock-free. When contention is
Re: [PATCH -next] sched: fix cid_lock kernel-doc warnings
Posted by Peter Zijlstra 2 years, 9 months ago
On Mon, May 01, 2023 at 03:20:20PM +0200, Peter Zijlstra wrote:
> On Thu, Apr 27, 2023 at 08:11:11PM -0700, Randy Dunlap wrote:
> > Fix kernel-doc warnings for cid_lock and use_cid_lock.
> > These comments are not in kernel-doc format.
> > 
> > kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
> >  on line 11496 - I thought it was a doc line
> > kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
> >  on line 11505 - I thought it was a doc line
> > 
> > Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> 
> Blergh, so mostly I avoid kerneldoc like the plague; because then you
> get random people doing 'fixups' that end up making the actual comment
> unreadable garbage.
> 
> Mostly my answer to any such patch is to simply remove the extra * and
> call it fixed.
> 
> But now the thing presumes to know better? :-(

Bah, I should go sleep more.. this removes them. All good.
Re: [PATCH -next] sched: fix cid_lock kernel-doc warnings
Posted by Mathieu Desnoyers 2 years, 9 months ago
On 2023-04-27 23:11, Randy Dunlap wrote:
> Fix kernel-doc warnings for cid_lock and use_cid_lock.
> These comments are not in kernel-doc format.
> 
> kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
>   on line 11496 - I thought it was a doc line
> kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>   on line 11505 - I thought it was a doc line
> 

Right. It made sense to have those as kernel-doc when those were 
mm_struct fields in previous versions of the patch, but not anymore now 
that those are stand-alone static variables.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks,

Mathieu

> Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
>   kernel/sched/core.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff -- a/kernel/sched/core.c b/kernel/sched/core.c
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -11492,7 +11492,7 @@ void call_trace_sched_update_nr_running(
>   
>   #ifdef CONFIG_SCHED_MM_CID
>   
> -/**
> +/*
>    * @cid_lock: Guarantee forward-progress of cid allocation.
>    *
>    * Concurrency ID allocation within a bitmap is mostly lock-free. The cid_lock
> @@ -11501,7 +11501,7 @@ void call_trace_sched_update_nr_running(
>    */
>   DEFINE_RAW_SPINLOCK(cid_lock);
>   
> -/**
> +/*
>    * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>    *
>    * When @use_cid_lock is 0, the cid allocation is lock-free. When contention is

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
[tip: sched/urgent] sched: fix cid_lock kernel-doc warnings
Posted by tip-bot2 for Randy Dunlap 2 years, 9 months ago
The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     0019a2d4b7e37a983d133d42b707b8a3018ae6f4
Gitweb:        https://git.kernel.org/tip/0019a2d4b7e37a983d133d42b707b8a3018ae6f4
Author:        Randy Dunlap <rdunlap@infradead.org>
AuthorDate:    Thu, 27 Apr 2023 20:11:11 -07:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 08 May 2023 10:58:28 +02:00

sched: fix cid_lock kernel-doc warnings

Fix kernel-doc warnings for cid_lock and use_cid_lock.
These comments are not in kernel-doc format.

kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
 on line 11496 - I thought it was a doc line
kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
 on line 11505 - I thought it was a doc line

Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230428031111.322-1-rdunlap@infradead.org
---
 kernel/sched/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 944c3ae..a68d127 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -11492,7 +11492,7 @@ void call_trace_sched_update_nr_running(struct rq *rq, int count)
 
 #ifdef CONFIG_SCHED_MM_CID
 
-/**
+/*
  * @cid_lock: Guarantee forward-progress of cid allocation.
  *
  * Concurrency ID allocation within a bitmap is mostly lock-free. The cid_lock
@@ -11501,7 +11501,7 @@ void call_trace_sched_update_nr_running(struct rq *rq, int count)
  */
 DEFINE_RAW_SPINLOCK(cid_lock);
 
-/**
+/*
  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
  *
  * When @use_cid_lock is 0, the cid allocation is lock-free. When contention is