summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2025-12-29 22:11:03 +0300
committerBoqun Feng <boqun.feng@gmail.com>2026-01-01 11:39:46 +0300
commita525ccd4d3e91ff123960e44a8892fb76c8217ea (patch)
tree86fa63e4b98971b6f06ef9ee96f0e694ada02cb4
parente55c2e287174280ddef47ad58e83567a88ece39d (diff)
downloadlinux-a525ccd4d3e91ff123960e44a8892fb76c8217ea.tar.xz
srcu: Create an rcu_tasks_trace_expedite_current() function
This commit creates an rcu_tasks_trace_expedite_current() function that expedites the current (and possibly the next) RCU Tasks Trace grace period. If the current RCU Tasks Trace grace period is already waiting, that wait will complete before the expediting takes effect. If there is no RCU Tasks Trace grace period in flight, this function might well create one. 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 Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
-rw-r--r--include/linux/rcupdate_trace.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/rcupdate_trace.h b/include/linux/rcupdate_trace.h
index f47ba9c07460..cee89e51e45c 100644
--- a/include/linux/rcupdate_trace.h
+++ b/include/linux/rcupdate_trace.h
@@ -184,6 +184,20 @@ static inline void rcu_barrier_tasks_trace(void)
srcu_barrier(&rcu_tasks_trace_srcu_struct);
}
+/**
+ * rcu_tasks_trace_expedite_current - Expedite the current Tasks Trace RCU grace period
+ *
+ * Cause the current Tasks Trace RCU grace period to become expedited.
+ * The grace period following the current one might also be expedited.
+ * If there is no current grace period, one might be created. If the
+ * current grace period is currently sleeping, that sleep will complete
+ * before expediting will take effect.
+ */
+static inline void rcu_tasks_trace_expedite_current(void)
+{
+ srcu_expedite_current(&rcu_tasks_trace_srcu_struct);
+}
+
// Placeholders to enable stepwise transition.
void __init rcu_tasks_trace_suppress_unused(void);