From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Michael Jeanson <mjeanson@efficios.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Alexei Starovoitov <ast@kernel.org>, Yonghong Song <yhs@fb.com>,
"Paul E . McKenney" <paulmck@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
bpf@vger.kernel.org, Joel Fernandes <joel@joelfernandes.org>,
Jordan Rife <jrife@google.com>,
linux-trace-kernel@vger.kernel.org
Subject: [RFC PATCH 3/5] rcupdate_trace: Define rcu_tasks_trace lock guard
Date: Sat, 23 Nov 2024 10:30:29 -0500 [thread overview]
Message-ID: <20241123153031.2884933-4-mathieu.desnoyers@efficios.com> (raw)
In-Reply-To: <20241123153031.2884933-1-mathieu.desnoyers@efficios.com>
Define a rcu_tasks_trace lock guard for use by the syscall enter/exit
tracepoints.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michael Jeanson <mjeanson@efficios.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Yonghong Song <yhs@fb.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Jordan Rife <jrife@google.com>
Cc: linux-trace-kernel@vger.kernel.org
---
include/linux/rcupdate_trace.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/rcupdate_trace.h b/include/linux/rcupdate_trace.h
index eda493200663..e6c44eb428ab 100644
--- a/include/linux/rcupdate_trace.h
+++ b/include/linux/rcupdate_trace.h
@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/rcupdate.h>
+#include <linux/cleanup.h>
extern struct lockdep_map rcu_trace_lock_map;
@@ -98,4 +99,8 @@ static inline void rcu_read_lock_trace(void) { BUG(); }
static inline void rcu_read_unlock_trace(void) { BUG(); }
#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
+DEFINE_LOCK_GUARD_0(rcu_tasks_trace,
+ rcu_read_lock_trace(),
+ rcu_read_unlock_trace())
+
#endif /* __LINUX_RCUPDATE_TRACE_H */
--
2.39.5
next prev parent reply other threads:[~2024-11-23 15:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 15:30 [RFC PATCH 0/5] tracing: Remove conditional locking from tracepoints Mathieu Desnoyers
2024-11-23 15:30 ` [RFC PATCH 1/5] tracing: Move it_func[0] comment to the relevant context Mathieu Desnoyers
2024-11-23 15:30 ` [RFC PATCH 2/5] tracing: Remove __idx variable from __DO_TRACE Mathieu Desnoyers
2024-11-23 15:30 ` Mathieu Desnoyers [this message]
2024-11-23 15:30 ` [RFC PATCH 4/5] tracing: Remove conditional locking from __DO_TRACE() Mathieu Desnoyers
2024-11-23 17:38 ` Linus Torvalds
2024-11-25 1:50 ` Mathieu Desnoyers
2024-11-25 3:22 ` Steven Rostedt
2024-11-25 14:18 ` Mathieu Desnoyers
2024-11-25 14:26 ` Peter Zijlstra
2024-11-25 15:35 ` Przemek Kitszel
2024-11-25 17:51 ` Linus Torvalds
2024-11-26 8:45 ` Peter Zijlstra
2024-11-26 18:13 ` Linus Torvalds
2024-11-26 20:47 ` Dmitry Torokhov
2024-11-26 22:32 ` Przemek Kitszel
2024-11-26 22:40 ` Linus Torvalds
2024-11-23 15:30 ` [RFC PATCH 5/5] tracing: Remove cond argument from __DECLARE_TRACE_SYSCALL Mathieu Desnoyers
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=20241123153031.2884933-4-mathieu.desnoyers@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=joel@joelfernandes.org \
--cc=jrife@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=mjeanson@efficios.com \
--cc=namhyung@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yhs@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).