public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/21] Implement RCU Tasks Trace in terms of SRCU-fast and optimize
@ 2025-10-01 14:48 Paul E. McKenney
  2025-10-01 14:48 ` [PATCH v2 02/21] rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast Paul E. McKenney
                   ` (18 more replies)
  0 siblings, 19 replies; 28+ messages in thread
From: Paul E. McKenney @ 2025-10-01 14:48 UTC (permalink / raw)
  To: rcu; +Cc: linux-kernel, kernel-team, rostedt, andrii, ast, peterz, bpf

Hello!

This v2 series re-implements RCU Tasks Trace in terms of SRCU-fast,
reducing the size of the Linux-kernel RCU implementation by several
hundred lines of code.  It also removes a conditional branch from the
srcu_read_lock_fast() implementation in order to make SRCU-fast a bit
more fastpath-friendly.  The patches are as follows:

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

2.	Re-implement RCU Tasks Trace in terms of SRCU-fast.

3.	context_tracking: Remove
	rcu_task_trace_heavyweight_{enter,exit}().

4.	Clean up after the SRCU-fastification of RCU Tasks Trace.

5.	Move rcu_tasks_trace_srcu_struct out of #ifdef
	CONFIG_TASKS_RCU_GENERIC.

6.	Create an srcu_expedite_current() function.

7.	Test srcu_expedite_current().

8.	Add noinstr-fast rcu_read_{,un}lock_tasks_trace() APIs.

9.	Update Requirements.rst for RCU Tasks Trace.

10.	Deprecate rcu_read_{,un}lock_trace().

11.	Create a DEFINE_SRCU_FAST().

12.	Create an rcu_tasks_trace_expedite_current() function.

13.	Test rcu_tasks_trace_expedite_current().

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

15.	Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast().

16.	Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast().

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

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

19.	Update for SRCU-fast definitions and initialization.

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

21.	Mark diagnostic functions as notrace.

Changes since v1:

o	Consolidate RCU Tasks Trace cleanup patches per Alexei Starovoitov
	feedback.  This explains the decrease from 34 patches in v1 to
	only 21 in this v2 series.

o	While consolidating, consolidate the noinstr-fast patches and the
	DEFINE_SRCU_FAST()/init_srcu_struct_fast() patches.

o	Upgrade comments per Peter Zijlstra feedback.

o	Extract Tiny SRCU bug fix into its own commit per Andrii Nakryiko
	feedback.

o	Switch srcu_expedite_current() from preempt_disable() to
	migrate_disable() for PREEMPT_RT kernels per Zqiang feedback.

o	Apply tags.

https://lore.kernel.org/all/580ea2de-799a-4ddc-bde9-c16f3fb1e6e7@paulmck-laptop/

						Thanx, Paul

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

 Documentation/RCU/Design/Requirements/Requirements.rst   |   33 
 b/Documentation/RCU/Design/Requirements/Requirements.rst |   12 
 b/Documentation/RCU/checklist.rst                        |   12 
 b/Documentation/RCU/whatisRCU.rst                        |    3 
 b/Documentation/admin-guide/kernel-parameters.txt        |   15 
 b/include/linux/notifier.h                               |    2 
 b/include/linux/rcupdate.h                               |   31 
 b/include/linux/rcupdate_trace.h                         |  107 +-
 b/include/linux/sched.h                                  |    1 
 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/init/init_task.c                                       |    3 
 b/kernel/context_tracking.c                              |   20 
 b/kernel/fork.c                                          |    3 
 b/kernel/rcu/Kconfig                                     |   18 
 b/kernel/rcu/rcu.h                                       |    9 
 b/kernel/rcu/rcuscale.c                                  |    7 
 b/kernel/rcu/rcutorture.c                                |    2 
 b/kernel/rcu/refscale.c                                  |    9 
 b/kernel/rcu/srcutiny.c                                  |   13 
 b/kernel/rcu/srcutree.c                                  |   58 +
 b/kernel/rcu/tasks.h                                     |  617 ---------------
 b/kernel/rcu/tree.c                                      |    2 
 b/kernel/rcu/update.c                                    |    8 
 b/kernel/tracepoint.c                                    |   21 
 b/scripts/checkpatch.pl                                  |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TRACE01 |    1 
 b/tools/testing/selftests/rcutorture/configs/rcu/TRACE02 |    1 
 include/linux/rcupdate_trace.h                           |   81 +
 include/linux/sched.h                                    |    5 
 include/linux/srcu.h                                     |   40 
 include/linux/srcutiny.h                                 |   14 
 include/linux/srcutree.h                                 |   50 -
 kernel/rcu/Kconfig                                       |   25 
 kernel/rcu/rcutorture.c                                  |   32 
 kernel/rcu/srcutree.c                                    |   39 
 kernel/rcu/tasks.h                                       |  129 ---
 41 files changed, 525 insertions(+), 978 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-10-07 13:47 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01 14:48 [PATCH v2 0/21] Implement RCU Tasks Trace in terms of SRCU-fast and optimize Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 02/21] rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast Paul E. McKenney
2025-10-02 15:46   ` Frederic Weisbecker
2025-10-04  9:47     ` Paul E. McKenney
2025-10-07 12:10       ` Frederic Weisbecker
2025-10-07 13:47         ` Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 03/21] context_tracking: Remove rcu_task_trace_heavyweight_{enter,exit}() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 04/21] rcu: Clean up after the SRCU-fastification of RCU Tasks Trace Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 05/21] rcu: Move rcu_tasks_trace_srcu_struct out of #ifdef CONFIG_TASKS_RCU_GENERIC Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 06/21] srcu: Create an srcu_expedite_current() function Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 07/21] rcutorture: Test srcu_expedite_current() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 08/21] rcu: Add noinstr-fast rcu_read_{,un}lock_tasks_trace() APIs Paul E. McKenney
2025-10-02  1:37   ` Alexei Starovoitov
2025-10-02 13:38     ` Paul E. McKenney
2025-10-02 15:56       ` Alexei Starovoitov
2025-10-03  8:07         ` Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 09/21] rcu: Update Requirements.rst for RCU Tasks Trace Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 10/21] checkpatch: Deprecate rcu_read_{,un}lock_trace() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 11/21] srcu: Create a DEFINE_SRCU_FAST() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 12/21] srcu: Create an rcu_tasks_trace_expedite_current() function Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 13/21] rcutorture: Test rcu_tasks_trace_expedite_current() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 14/21] srcu: Make grace-period determination use ssp->srcu_reader_flavor Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 15/21] rcutorture: Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast() Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 16/21] refscale: " Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 17/21] srcu: Require special srcu_struct define/init for SRCU-fast readers Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 18/21] srcu: Make SRCU-fast readers enforce use of SRCU-fast definition/init Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 19/21] doc: Update for SRCU-fast definitions and initialization Paul E. McKenney
2025-10-01 14:48 ` [PATCH v2 20/21] tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox