[PATCH v2 0/16] SRCU updates for v6.19

Paul E. McKenney posted 16 patches 1 month, 1 week ago
b/Documentation/RCU/Design/Requirements/Requirements.rst |   33 +--
b/Documentation/RCU/checklist.rst                        |   12 -
b/Documentation/RCU/whatisRCU.rst                        |    3
b/include/linux/notifier.h                               |    2
b/include/linux/srcu.h                                   |   16 +
b/include/linux/srcutiny.h                               |    1
b/include/linux/srcutree.h                               |    8
b/include/linux/tracepoint.h                             |   45 ++--
b/include/trace/perf.h                                   |    4
b/include/trace/trace_events.h                           |    4
b/kernel/rcu/rcutorture.c                                |   12 +
b/kernel/rcu/srcutiny.c                                  |   13 -
b/kernel/rcu/srcutree.c                                  |   58 +++++
b/kernel/rcu/tree.c                                      |    2
b/kernel/rcu/update.c                                    |    8
b/kernel/tracepoint.c                                    |   21 +-
b/tools/testing/selftests/rcutorture/bin/kvm.sh          |    2
include/linux/srcu.h                                     |  133 ++++++++++---
include/linux/srcutiny.h                                 |   30 ++
include/linux/srcutree.h                                 |  152 +++++++++++----
kernel/rcu/rcutorture.c                                  |   84 ++++++--
kernel/rcu/srcutree.c                                    |   78 +++++++
22 files changed, 575 insertions(+), 146 deletions(-)
[PATCH v2 0/16] SRCU updates for v6.19
Posted by Paul E. McKenney 1 month, 1 week ago
Hello!

This series creates an srcu_expedite_current() function that allows
after-the-fact expediting of SRCU grace periods, adds a DEFINE_SRCU_FAST()
that further speeds things up by removing a conditional branch from
srcu_read_lock_fast*(), updates documentation, uses SRCU-fast to guard
event traces in PREEMPT_RT kernel (thus making such kernels safe for
event tracing), adds srcu_read_{,un}lock_fast_updown() functions that are
compatible with srcu_down_read() and srcu_up_read(), but do not permit
use in NMI handlers (to permit further optimization of SRCU-fast readers
by relieving them of the need to deal with irq/softirq/NMI handlers with
unbalanced lock/unlock calls), and optimizes SRCU-fast-updown for large
ARM servers that use LSE.  It is expected that this optimization will be
obsoleted by some arm64 architecture-specific work:

	https://lore.kernel.org/all/aQU7l-qMKJTx4znJ@arm.com/

The patches are as follows:

1.	Permit Tiny SRCU srcu_read_unlock() with interrupts disabled.

2.	Create an srcu_expedite_current() function.

3.	Test srcu_expedite_current().

4.	Create a DEFINE_SRCU_FAST().

5.	Make grace-period determination use ssp->srcu_reader_flavor.

6.	Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast().

7.	Require special srcu_struct define/init for SRCU-fast readers.

8.	Make SRCU-fast readers enforce use of SRCU-fast definition/init.

9.	Update for SRCU-fast definitions and initialization.

10.	Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast.

11.	Mark diagnostic functions as notrace.

12.	Add SRCU_READ_FLAVOR_FAST_UPDOWN CPP macro.

13.	Permit negative kvm.sh --kconfig numberic arguments.

14.	Create an SRCU-fast-updown API.

15.	Optimize SRCU-fast-updown for arm64.

16.	Make srcu{,d}_torture_init() announce the SRCU type.

Changes since v1:

o	Merge addition and testing of SRCU-fast-updown for bisectability.

https://lore.kernel.org/all/082fb8ba-91b8-448e-a472-195eb7b282fd@paulmck-laptop/

Many of these patches were previously associated with another series
that re-implemented RCU tasks trace in terms of SRCU-fast.  This work
is being deferred pending resolution of the ARM LSE situation on the one
hand or full debugging of the all-too-clever workaround optimization on
the other.  ;-)

https://lore.kernel.org/all/7fa58961-2dce-4e08-8174-1d1cc592210f@paulmck-laptop/

						Thanx, Paul

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

 b/Documentation/RCU/Design/Requirements/Requirements.rst |   33 +--
 b/Documentation/RCU/checklist.rst                        |   12 -
 b/Documentation/RCU/whatisRCU.rst                        |    3 
 b/include/linux/notifier.h                               |    2 
 b/include/linux/srcu.h                                   |   16 +
 b/include/linux/srcutiny.h                               |    1 
 b/include/linux/srcutree.h                               |    8 
 b/include/linux/tracepoint.h                             |   45 ++--
 b/include/trace/perf.h                                   |    4 
 b/include/trace/trace_events.h                           |    4 
 b/kernel/rcu/rcutorture.c                                |   12 +
 b/kernel/rcu/srcutiny.c                                  |   13 -
 b/kernel/rcu/srcutree.c                                  |   58 +++++
 b/kernel/rcu/tree.c                                      |    2 
 b/kernel/rcu/update.c                                    |    8 
 b/kernel/tracepoint.c                                    |   21 +-
 b/tools/testing/selftests/rcutorture/bin/kvm.sh          |    2 
 include/linux/srcu.h                                     |  133 ++++++++++---
 include/linux/srcutiny.h                                 |   30 ++
 include/linux/srcutree.h                                 |  152 +++++++++++----
 kernel/rcu/rcutorture.c                                  |   84 ++++++--
 kernel/rcu/srcutree.c                                    |   78 +++++++
 22 files changed, 575 insertions(+), 146 deletions(-)
Re: [PATCH v2 0/16] SRCU updates for v6.19
Posted by Frederic Weisbecker 1 month, 1 week ago
Le Wed, Nov 05, 2025 at 12:31:00PM -0800, Paul E. McKenney a écrit :
> Hello!
> 
> This series creates an srcu_expedite_current() function that allows
> after-the-fact expediting of SRCU grace periods, adds a DEFINE_SRCU_FAST()
> that further speeds things up by removing a conditional branch from
> srcu_read_lock_fast*(), updates documentation, uses SRCU-fast to guard
> event traces in PREEMPT_RT kernel (thus making such kernels safe for
> event tracing), adds srcu_read_{,un}lock_fast_updown() functions that are
> compatible with srcu_down_read() and srcu_up_read(), but do not permit
> use in NMI handlers (to permit further optimization of SRCU-fast readers
> by relieving them of the need to deal with irq/softirq/NMI handlers with
> unbalanced lock/unlock calls), and optimizes SRCU-fast-updown for large
> ARM servers that use LSE.  It is expected that this optimization will be
> obsoleted by some arm64 architecture-specific work:
> 
> 	https://lore.kernel.org/all/aQU7l-qMKJTx4znJ@arm.com/
> 
> The patches are as follows:
> 
> 1.	Permit Tiny SRCU srcu_read_unlock() with interrupts disabled.
> 
> 2.	Create an srcu_expedite_current() function.
> 
> 3.	Test srcu_expedite_current().
> 
> 4.	Create a DEFINE_SRCU_FAST().
> 
> 5.	Make grace-period determination use ssp->srcu_reader_flavor.
> 
> 6.	Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast().
> 
> 7.	Require special srcu_struct define/init for SRCU-fast readers.
> 
> 8.	Make SRCU-fast readers enforce use of SRCU-fast definition/init.
> 
> 9.	Update for SRCU-fast definitions and initialization.
> 
> 10.	Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast.
> 
> 11.	Mark diagnostic functions as notrace.
> 
> 12.	Add SRCU_READ_FLAVOR_FAST_UPDOWN CPP macro.
> 
> 13.	Permit negative kvm.sh --kconfig numberic arguments.
> 
> 14.	Create an SRCU-fast-updown API.
> 
> 15.	Optimize SRCU-fast-updown for arm64.
> 
> 16.	Make srcu{,d}_torture_init() announce the SRCU type.
> 
> Changes since v1:
> 
> o	Merge addition and testing of SRCU-fast-updown for bisectability.
> 
> https://lore.kernel.org/all/082fb8ba-91b8-448e-a472-195eb7b282fd@paulmck-laptop/
> 
> Many of these patches were previously associated with another series
> that re-implemented RCU tasks trace in terms of SRCU-fast.  This work
> is being deferred pending resolution of the ARM LSE situation on the one
> hand or full debugging of the all-too-clever workaround optimization on
> the other.  ;-)
> 
> https://lore.kernel.org/all/7fa58961-2dce-4e08-8174-1d1cc592210f@paulmck-laptop/
> 
> 						Thanx, Paul

Applied to rcu/srcu, thanks!

-- 
Frederic Weisbecker
SUSE Labs
Re: [PATCH v2 0/16] SRCU updates for v6.19
Posted by Steven Rostedt 1 month, 1 week ago
On Thu, 6 Nov 2025 00:00:19 +0100
Frederic Weisbecker <frederic@kernel.org> wrote:

> Applied to rcu/srcu, thanks!

I have issues with patch 10, so please do not apply it.

-- Steve
Re: [PATCH v2 0/16] SRCU updates for v6.19
Posted by Frederic Weisbecker 1 month, 1 week ago
Le Thu, Nov 06, 2025 at 11:06:10AM -0500, Steven Rostedt a écrit :
> On Thu, 6 Nov 2025 00:00:19 +0100
> Frederic Weisbecker <frederic@kernel.org> wrote:
> 
> > Applied to rcu/srcu, thanks!
> 
> I have issues with patch 10, so please do not apply it.

Ok, dropping it, thanks!

-- 
Frederic Weisbecker
SUSE Labs
Re: [PATCH v2 0/16] SRCU updates for v6.19
Posted by Paul E. McKenney 1 month, 1 week ago
On Fri, Nov 07, 2025 at 01:48:25PM +0100, Frederic Weisbecker wrote:
> Le Thu, Nov 06, 2025 at 11:06:10AM -0500, Steven Rostedt a écrit :
> > On Thu, 6 Nov 2025 00:00:19 +0100
> > Frederic Weisbecker <frederic@kernel.org> wrote:
> > 
> > > Applied to rcu/srcu, thanks!
> > 
> > I have issues with patch 10, so please do not apply it.
> 
> Ok, dropping it, thanks!

Thank you, Frederic, and apologies for both the delay and the hassle!

							Thanx, Paul