mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	rostedt@goodmis.org, Christoph Hellwig <hch@infradead.org>
Subject: [PATCH v2 0/5] Remove SRCU-lite in favor of SRCU-fast
Date: Tue, 1 Jul 2025 17:23:06 -0700	[thread overview]
Message-ID: <2994ade2-bd06-4ba7-bcc9-be4d0d15ea0c@paulmck-laptop> (raw)
In-Reply-To: <e5dd6af2-fdbf-4773-9732-13b84ca13a12@paulmck-laptop>

Hello!

This series removes the deprecated SRCU-lite flavor.

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.

1.	Remove support for SRCU-lite.

2.	Remove SRCU-lite scenarios.

3.	Remove support for SRCU-lite.

4.	Remove SRCU-lite implementation.

5.	Remove SRCU-lite deprecation.


Changes since v1:

o	Add short explanation of SRCU-lite and SRCU-fast.

						Thanx, Paul

------------------------------------------------------------------------

 b/include/linux/srcu.h                                     |    2 
 b/include/linux/srcutiny.h                                 |    3 
 b/include/linux/srcutree.h                                 |   38 ----------
 b/kernel/rcu/rcutorture.c                                  |    7 -
 b/kernel/rcu/refscale.c                                    |   32 --------
 b/scripts/checkpatch.pl                                    |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/CFLIST    |    1 
 include/linux/srcu.h                                       |   47 -------------
 tools/testing/selftests/rcutorture/configs/rcu/SRCU-L      |   10 --
 tools/testing/selftests/rcutorture/configs/rcu/SRCU-L.boot |    3 
 10 files changed, 4 insertions(+), 141 deletions(-)

  parent reply	other threads:[~2025-07-02  0:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 16:13 [PATCH " 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
2025-06-26 11:03       ` Christoph Hellwig
2025-06-26 14:37         ` Paul E. McKenney
2025-07-02  0:23 ` Paul E. McKenney [this message]
2025-07-02  0:23   ` [PATCH v2 " 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=2994ade2-bd06-4ba7-bcc9-be4d0d15ea0c@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

all inboxes | Powered by JetHome®