public inbox for rcu@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Joel Fernandes <joelagnelf@nvidia.com>
Cc: linux-kernel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun@kernel.org>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	rcu@vger.kernel.org,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH -next v1 10/16] rcu-tasks: Document that RCU Tasks Trace grace periods now imply RCU grace periods
Date: Wed, 18 Mar 2026 12:04:23 +0100	[thread overview]
Message-ID: <abqGt2CQCfM4PeqK@localhost.localdomain> (raw)
In-Reply-To: <20260317212217.1527644-11-joelagnelf@nvidia.com>

Le Tue, Mar 17, 2026 at 05:22:11PM -0400, Joel Fernandes a écrit :
> From: "Paul E. McKenney" <paulmck@kernel.org>
> 
> Now that RCU Tasks Trace is implemented in terms of SRCU-fast, the fact
> that each SRCU-fast grace period implies at least two RCU grace periods

two or one?

AFAIU srcu_readers_active_idx_check() it's only one?

> in turn means that each RCU Tasks Trace grace period implies at least
> two grace periods.  This commit therefore updates the documentation
> accordingly.
> 
> Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
> ---
>  Documentation/RCU/Design/Requirements/Requirements.rst | 7 +++++++
>  include/linux/rcupdate.h                               | 9 +++------
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/RCU/Design/Requirements/Requirements.rst b/Documentation/RCU/Design/Requirements/Requirements.rst
> index b5cdbba3ec2e..4d886e7c7a95 100644
> --- a/Documentation/RCU/Design/Requirements/Requirements.rst
> +++ b/Documentation/RCU/Design/Requirements/Requirements.rst
> @@ -2787,6 +2787,13 @@ which avoids the read-side memory barriers, at least for architectures
>  that apply noinstr to kernel entry/exit code (or that build with
>  ``CONFIG_TASKS_TRACE_RCU_NO_MB=y``.
>  
> +Now that the implementation is based on SRCU-fast, a call
> +to synchronize_rcu_tasks_trace() implies at least one call to
> +synchronize_rcu(), that is, every Tasks Trace RCU grace period contains
> +at least one plain vanilla RCU grace period.  Should there ever
> +be a synchronize_rcu_tasks_trace_expedited(), this guarantee would
> +*not* necessarily apply to this hypothetical API member.
> +
>  The tasks-trace-RCU API is also reasonably compact,
>  consisting of rcu_read_lock_trace(), rcu_read_unlock_trace(),
>  rcu_read_lock_trace_held(), call_rcu_tasks_trace(),
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index 04f3f86a4145..18a85c30fd4f 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -208,12 +208,9 @@ static inline void exit_tasks_rcu_finish(void) { }
>  /**
>   * rcu_trace_implies_rcu_gp - does an RCU Tasks Trace grace period imply an RCU grace period?
>   *
> - * As an accident of implementation, an RCU Tasks Trace grace period also
> - * acts as an RCU grace period.  However, this could change at any time.
> - * Code relying on this accident must call this function to verify that
> - * this accident is still happening.
> - *
> - * You have been warned!
> + * Now that RCU Tasks Trace is implemented in terms of SRCU-fast, a
> + * call to synchronize_rcu_tasks_trace() is guaranteed to imply at least
> + * one call to synchronize_rcu().
>   */
>  static inline bool rcu_trace_implies_rcu_gp(void) { return true; }

I guess the plan is to remote that function?

Other than that:

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>


>  
> -- 
> 2.34.1
> 

-- 
Frederic Weisbecker
SUSE Labs

  reply	other threads:[~2026-03-18 11:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 21:22 [PATCH -next v1 00/16] Candidate patches for the v7.1 merge window Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 01/16] rcutorture: Add a textbook-style trivial preemptible RCU Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 02/16] kvm-check-branches.sh: Remove in favor of kvm-series.sh Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 03/16] torture: Make hangs more visible in torture.sh output Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 04/16] torture: Print informative message for test without recheck file Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 05/16] rcutorture: Fix numeric "test" comparison in srcu_lockdep.sh Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 06/16] refscale: Ditch ref_scale_shutdown in favor of torture_shutdown_init() Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 07/16] rcuscale: Ditch rcu_scale_shutdown " Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 08/16] srcu: Fix SRCU read flavor macro comments Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 09/16] srcu: Fix s/they disables/they disable/ typo in srcu_read_unlock_fast() Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 10/16] rcu-tasks: Document that RCU Tasks Trace grace periods now imply RCU grace periods Joel Fernandes
2026-03-18 11:04   ` Frederic Weisbecker [this message]
2026-03-18 12:15     ` Frederic Weisbecker
2026-03-17 21:22 ` [PATCH -next v1 11/16] rcutorture: Add NOCB01 config for RCU_LAZY torture testing Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 12/16] rcutorture: Add NOCB02 config for nocb poll mode testing Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 13/16] rcu-tasks: Remove unnecessary smp_store_release() in cblist_init_generic() Joel Fernandes
2026-03-18 10:57   ` Frederic Weisbecker
2026-03-17 21:22 ` [PATCH -next v1 14/16] rcu/nocb: Consolidate rcu_nocb_cpu_offload/deoffload functions Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 15/16] rcu/nocb: Extract nocb_bypass_needs_flush() to reduce duplication Joel Fernandes
2026-03-17 21:22 ` [PATCH -next v1 16/16] torture: Avoid modulo-zero error in torture_hrtimeout_ns() 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=abqGt2CQCfM4PeqK@localhost.localdomain \
    --to=frederic@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=boqun@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joelagnelf@nvidia.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang@linux.dev \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=urezki@gmail.com \
    /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