Linux RCU subsystem development
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: joelagnelf@nvidia.com
Cc: paulmck@kernel.org, rcu@vger.kernel.org,
	Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v5] rcutorture: Perform more frequent testing of ->gpwrap
Date: Sun, 11 May 2025 18:27:26 +0900	[thread overview]
Message-ID: <24beb2bb-b168-4849-804b-033c20ca352e@gmail.com> (raw)
In-Reply-To: <20250421174717.3332525-1-joelagnelf@nvidia.com>

[Trimmed most CCs]

Hi Joel,

I've got a warning from "make htmldocs" on top of rcu/next:

[...]/kernel/rcu/tree.c:775: warning: cannot understand function prototype: 'unsigned long seq_gpwrap_lag = ULONG_MAX / 4; '

On Mon, 21 Apr 2025 13:47:15 -0400, Joel Fernandes wrote:
[...]

> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 659f83e71048..6ec30d07759d 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
[...]

> @@ -757,6 +766,25 @@ void rcu_request_urgent_qs_task(struct task_struct *t)
>  	smp_store_release(per_cpu_ptr(&rcu_data.rcu_urgent_qs, cpu), true);
>  }
>  
> +/**
> + * rcu_set_gpwrap_lag - Set RCU GP sequence overflow lag value.
> + * @lag_gps: Set overflow lag to this many grace period worth of counters
> + * which is used by rcutorture to quickly force a gpwrap situation.
> + * @lag_gps = 0 means we reset it back to the boot-time value.
> + */

This kernel-doc comment should be in front of its corresponding function
prototype so that it is recognized as such.

> +static unsigned long seq_gpwrap_lag = ULONG_MAX / 4;
> +

, so this static variable needs to go above the kernel-doc comment.

> +void rcu_set_gpwrap_lag(unsigned long lag_gps)
> +{
> +	unsigned long lag_seq_count;
> +
> +	lag_seq_count = (lag_gps == 0)
> +			? ULONG_MAX / 4
> +			: lag_gps << RCU_SEQ_CTR_SHIFT;
> +	WRITE_ONCE(seq_gpwrap_lag, lag_seq_count);
> +}
> +EXPORT_SYMBOL_GPL(rcu_set_gpwrap_lag);
> +

You can test it by saying:

    ./scripts/kernel-doc -none kernel/rcu/tree.c

Thanks,
Akira


  parent reply	other threads:[~2025-05-11  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21 17:47 [PATCH v5] rcutorture: Perform more frequent testing of ->gpwrap Joel Fernandes
2025-04-21 17:53 ` Joel Fernandes
2025-04-21 18:32   ` Paul E. McKenney
2025-04-21 20:27     ` Joel Fernandes
2025-05-11  9:27 ` Akira Yokosawa [this message]
2025-05-12 15:08   ` Joel Fernandes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24beb2bb-b168-4849-804b-033c20ca352e@gmail.com \
    --to=akiyks@gmail.com \
    --cc=joelagnelf@nvidia.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox