public inbox for linux-kernel@vger.kernel.org
 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, "Paul E. McKenney" <paulmck@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	bpf@vger.kernel.org
Subject: [PATCH 14/34] rcu: Move rcu_tasks_trace_srcu_struct out of #ifdef CONFIG_TASKS_RCU_GENERIC
Date: Tue, 23 Sep 2025 07:20:16 -0700	[thread overview]
Message-ID: <20250923142036.112290-14-paulmck@kernel.org> (raw)
In-Reply-To: <580ea2de-799a-4ddc-bde9-c16f3fb1e6e7@paulmck-laptop>

Moving rcu_tasks_trace_srcu_struct out the CONFIG_TASKS_RCU_GENERIC
removed, and also permits the CONFIG_TASKS_TRACE_RCU Kconfig option to
stop enabling the CONFIG_TASKS_RCU_GENERIC Kconfig option.  This commit
therefore makes it so.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <bpf@vger.kernel.org>
---
 kernel/rcu/Kconfig |  2 +-
 kernel/rcu/tasks.h | 38 +++++++++++++-------------------------
 2 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index ceaf6594f634cd..eeaa1cd47c6c4c 100644
--- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig
@@ -82,7 +82,7 @@ config NEED_SRCU_NMI_SAFE
 	def_bool HAVE_NMI && !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !TINY_SRCU
 
 config TASKS_RCU_GENERIC
-	def_bool TASKS_RCU || TASKS_RUDE_RCU || TASKS_TRACE_RCU
+	def_bool TASKS_RCU || TASKS_RUDE_RCU
 	help
 	  This option enables generic infrastructure code supporting
 	  task-based RCU implementations.  Not for manual selection.
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index e70609c85ece5d..a3c16e65e16812 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -1444,31 +1444,6 @@ EXPORT_SYMBOL_GPL(rcu_tasks_rude_get_gp_data);
 
 #endif /* #ifdef CONFIG_TASKS_RUDE_RCU */
 
-////////////////////////////////////////////////////////////////////////
-//
-// Tracing variant of Tasks RCU.  This variant is designed to be used
-// to protect tracing hooks, including those of BPF.  This variant
-// is implemented via a straightforward mapping onto SRCU-fast.
-
-#ifdef CONFIG_TASKS_TRACE_RCU
-
-DEFINE_SRCU(rcu_tasks_trace_srcu_struct);
-EXPORT_SYMBOL_GPL(rcu_tasks_trace_srcu_struct);
-
-// Placeholder to suppress build errors through transition period.
-void __init rcu_tasks_trace_suppress_unused(void)
-{
-	show_rcu_tasks_generic_gp_kthread(NULL, NULL);
-	rcu_spawn_tasks_kthread_generic(NULL);
-	synchronize_rcu_tasks_generic(NULL);
-	call_rcu_tasks_generic(NULL, NULL, NULL);
-	call_rcu_tasks_iw_wakeup(NULL);
-	cblist_init_generic(NULL);
-	rcu_tasks_torture_stats_print_generic(NULL, NULL, NULL, NULL);
-}
-
-#endif /* #else #ifdef CONFIG_TASKS_TRACE_RCU */
-
 #ifndef CONFIG_TINY_RCU
 void show_rcu_tasks_gp_kthreads(void)
 {
@@ -1622,3 +1597,16 @@ core_initcall(rcu_init_tasks_generic);
 #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
 static inline void rcu_tasks_bootup_oddness(void) {}
 #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
+
+#ifdef CONFIG_TASKS_TRACE_RCU
+
+////////////////////////////////////////////////////////////////////////
+//
+// Tracing variant of Tasks RCU.  This variant is designed to be used
+// to protect tracing hooks, including those of BPF.  This variant
+// is implemented via a straightforward mapping onto SRCU-fast.
+
+DEFINE_SRCU(rcu_tasks_trace_srcu_struct);
+EXPORT_SYMBOL_GPL(rcu_tasks_trace_srcu_struct);
+
+#endif /* #else #ifdef CONFIG_TASKS_TRACE_RCU */
-- 
2.40.1


  parent reply	other threads:[~2025-09-23 14:21 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 14:20 [PATCH 0/34] Implement RCU Tasks Trace in terms of SRCU-fast and optimize Paul E. McKenney
2025-09-23 14:20 ` [PATCH 01/34] rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast Paul E. McKenney
2025-09-25 18:39   ` Andrii Nakryiko
2025-09-25 18:58     ` Paul E. McKenney
2025-09-23 14:20 ` [PATCH 02/34] rcu: Remove unused ->trc_ipi_to_cpu and ->trc_blkd_cpu from task_struct Paul E. McKenney
2025-09-23 14:20 ` [PATCH 03/34] rcu: Remove ->trc_blkd_node " Paul E. McKenney
2025-09-23 14:20 ` [PATCH 04/34] rcu: Remove ->trc_holdout_list " Paul E. McKenney
2025-09-23 14:20 ` [PATCH 05/34] rcu: Remove rcu_tasks_trace_qs() and the functions that it calls Paul E. McKenney
2025-09-23 14:20 ` [PATCH 06/34] context_tracking: Remove rcu_task_trace_heavyweight_{enter,exit}() Paul E. McKenney
2025-09-23 14:20 ` [PATCH 07/34] rcu: Remove ->trc_reader_special from task_struct Paul E. McKenney
2025-09-23 14:20 ` [PATCH 08/34] rcu: Remove now-empty RCU Tasks Trace functions and calls to them Paul E. McKenney
2025-09-23 14:20 ` [PATCH 09/34] rcu: Remove unused rcu_tasks_trace_lazy_ms and trc_stall_chk_rdr struct Paul E. McKenney
2025-09-23 14:20 ` [PATCH 10/34] rcu: Remove now-empty show_rcu_tasks_trace_gp_kthread() function Paul E. McKenney
2025-09-23 14:20 ` [PATCH 11/34] rcu: Remove now-empty rcu_tasks_trace_get_gp_data() function Paul E. McKenney
2025-09-23 14:20 ` [PATCH 12/34] rcu: Remove now-empty rcu_tasks_trace_torture_stats_print() function Paul E. McKenney
2025-09-23 14:20 ` [PATCH 13/34] rcu: Remove now-empty get_rcu_tasks_trace_gp_kthread() function Paul E. McKenney
2025-09-23 14:20 ` Paul E. McKenney [this message]
2025-09-23 14:20 ` [PATCH 15/34] rcu: Add noinstr-fast rcu_read_{,un}lock_tasks_trace() APIs Paul E. McKenney
2025-09-23 17:32   ` Peter Zijlstra
2025-09-24  8:44     ` Paul E. McKenney
2025-09-24  9:08       ` Peter Zijlstra
2025-09-23 14:20 ` [PATCH 16/34] rcu: Remove now-unused rcu_task_ipi_delay and TASKS_TRACE_RCU_READ_MB Paul E. McKenney
2025-09-23 14:20 ` [PATCH 17/34] srcu: Create a DEFINE_SRCU_FAST() Paul E. McKenney
2025-09-23 14:20 ` [PATCH 18/34] rcu: Use smp_mb() only when necessary in RCU Tasks Trace readers Paul E. McKenney
2025-09-23 14:20 ` [PATCH 19/34] rcu: Update Requirements.rst for RCU Tasks Trace Paul E. McKenney
2025-09-25 18:40   ` Andrii Nakryiko
2025-09-25 18:53     ` Paul E. McKenney
2025-09-23 14:20 ` [PATCH 20/34] checkpatch: Deprecate rcu_read_{,un}lock_trace() Paul E. McKenney
2025-09-23 15:47   ` Joe Perches
2025-09-23 17:01     ` Paul E. McKenney
2025-09-23 14:20 ` [PATCH 21/34] rcu: Mark diagnostic functions as notrace Paul E. McKenney
2025-09-23 14:20 ` [PATCH 22/34] tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast Paul E. McKenney
2025-09-23 14:20 ` [PATCH 23/34] srcu: Create an srcu_expedite_current() function Paul E. McKenney
2025-09-24  0:10   ` Zqiang
2025-09-24  8:56     ` Paul E. McKenney
2025-09-23 14:20 ` [PATCH 24/34] rcutorture: Test srcu_expedite_current() Paul E. McKenney
2025-09-23 14:20 ` [PATCH 25/34] srcu: Create an rcu_tasks_trace_expedite_current() function Paul E. McKenney
2025-09-23 14:20 ` [PATCH 26/34] rcutorture: Test rcu_tasks_trace_expedite_current() Paul E. McKenney
2025-09-23 14:20 ` [PATCH 27/34] srcu: Make DEFINE_SRCU_FAST() available to modules Paul E. McKenney
2025-09-23 14:20 ` [PATCH 28/34] srcu: Make SRCU-fast available to heap srcu_struct structures Paul E. McKenney
2025-09-23 14:20 ` [PATCH 29/34] srcu: Make grace-period determination use ssp->srcu_reader_flavor Paul E. McKenney
2025-09-23 14:20 ` [PATCH 30/34] rcutorture: Exercise DEFINE_STATIC_SRCU_FAST() and init_srcu_struct_fast() Paul E. McKenney
2025-09-23 14:20 ` [PATCH 31/34] refscale: " Paul E. McKenney
2025-09-23 14:20 ` [PATCH 32/34] srcu: Require special srcu_struct define/init for SRCU-fast readers Paul E. McKenney
2025-09-23 14:20 ` [PATCH 33/34] srcu: Make SRCU-fast readers enforce use of SRCU-fast definition/init Paul E. McKenney
2025-09-23 14:20 ` [PATCH 34/34] doc: Update for SRCU-fast definitions and initialization Paul E. McKenney
2025-09-24  7:49 ` [PATCH 0/34] Implement RCU Tasks Trace in terms of SRCU-fast and optimize Alexei Starovoitov
2025-09-24  8:20   ` 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=20250923142036.112290-14-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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