linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, rostedt@goodmis.org
Subject: Re: [PATCH 1/5] torture: Remove support for SRCU-lite
Date: Thu, 26 Jun 2025 03:54:06 -0700	[thread overview]
Message-ID: <167ab1f0-ea85-4a0f-8a19-1d74e2fa7439@paulmck-laptop> (raw)
In-Reply-To: <aFvmG2lT65Ido1fq@infradead.org>

On Wed, Jun 25, 2025 at 05:05:47AM -0700, Christoph Hellwig wrote:
> On Tue, Jun 24, 2025 at 09:13:56AM -0700, Paul E. McKenney wrote:
> > Because SRCU-lite is being replaced by SRCU-fast, this commit removes
> > support for SRCU-lite from refscale.c.
> 
> Please explain how they different and why one is a good enough (or
> even better?) replacement for the other.

Ah, good point, thank you!

How about if I add this to the cover letter?

	Both SRCU-lite and SRCU-fast provide faster readers by dropping
	the smp_mb() call from their lock and unlock primitives.
	The price of this is a pair of added RCU grace periods during
	the SRCU grace period.

	SRCU-fast also adds NMI safety for architectures that have
	NMIs but do not have NMI-safe per-CPU operations.  In addition,
	srcu_read_lock_fast() returns a per-CPU pointer rather than an
	integer, which provides a further speedup compared to SRCU-lite
	by getting rid of array-index calculations.

	There is a trivial mapping from the SRCU-lite API to that
	of SRCU-fast, so we do not expect any transition issues.
	In addition, while SRCU-lite remains in the kernel, checkpatch.pl
	will warn about added SRCU-lite use cases.

	Further read-side speedups are possible, but they amount to only
	about half a nanosecond out of about two nanoseconds (measured on
	my x86 laptop), and they might require some changes to existing
	SRCU code.  These changes are trivial, but we need to see a
	solid need for the additional performance before inconveniencing
	existing users.

							Thanx, Paul

  reply	other threads:[~2025-06-26 10:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 16:13 [PATCH 0/5] Remove SRCU-lite in favor of SRCU-fast Paul E. McKenney
2025-06-24 16:13 ` [PATCH 2/5] rcutorture: Remove SRCU-lite scenarios Paul E. McKenney
2025-06-24 16:13 ` [PATCH 3/5] rcutorture: Remove support for SRCU-lite Paul E. McKenney
2025-06-24 16:13 ` [PATCH 4/5] srcu: Remove SRCU-lite implementation Paul E. McKenney
2025-06-24 16:14 ` [PATCH 5/5] checkpatch: Remove SRCU-lite deprecation Paul E. McKenney
     [not found] ` <20250624161400.867880-1-paulmck@kernel.org>
2025-06-25 12:05   ` [PATCH 1/5] torture: Remove support for SRCU-lite Christoph Hellwig
2025-06-26 10:54     ` Paul E. McKenney [this message]
2025-06-26 11:03       ` Christoph Hellwig
2025-06-26 14:37         ` Paul E. McKenney
2025-07-02  0:23 ` [PATCH v2 0/5] Remove SRCU-lite in favor of SRCU-fast Paul E. McKenney
2025-07-02  0:23   ` [PATCH v2 1/5] torture: Remove support for SRCU-lite Paul E. McKenney
2025-07-02  0:23   ` [PATCH v2 2/5] rcutorture: Remove SRCU-lite scenarios Paul E. McKenney
2025-07-02  0:23   ` [PATCH v2 4/5] srcu: Remove SRCU-lite implementation Paul E. McKenney
2025-07-02  0:23   ` [PATCH v2 5/5] checkpatch: Remove SRCU-lite deprecation Paul E. McKenney

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=167ab1f0-ea85-4a0f-8a19-1d74e2fa7439@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=hch@infradead.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).