[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200219150745.003368327@infradead.org>
Date: Wed, 19 Feb 2020 15:47:35 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
rostedt@...dmis.org
Cc: peterz@...radead.org, mingo@...nel.org, joel@...lfernandes.org,
gregkh@...uxfoundation.org, gustavo@...eddedor.com,
tglx@...utronix.de, paulmck@...nel.org, josh@...htriplett.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
luto@...nel.org, tony.luck@...el.com, frederic@...nel.org,
dan.carpenter@...cle.com, mhiramat@...nel.org,
"Steven Rostedt (VMware)" <rosted@...dmis.org>
Subject: [PATCH v3 11/22] perf,tracing: Prepare the perf-trace interface for RCU changes
The tracepoint interface will stop providing regular RCU context; make
sure we do it ourselves, since perf makes use of regular RCU protected
data.
Suggested-by: Steven Rostedt (VMware) <rosted@...dmis.org>
Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
kernel/events/core.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -8950,6 +8950,7 @@ void perf_tp_event(u16 event_type, u64 c
{
struct perf_sample_data data;
struct perf_event *event;
+ unsigned long rcu_flags;
struct perf_raw_record raw = {
.frag = {
@@ -8961,6 +8962,8 @@ void perf_tp_event(u16 event_type, u64 c
perf_sample_data_init(&data, 0, 0);
data.raw = &raw;
+ rcu_flags = trace_rcu_enter();
+
perf_trace_buf_update(record, event_type);
hlist_for_each_entry_rcu(event, head, hlist_entry) {
@@ -8996,6 +8999,8 @@ void perf_tp_event(u16 event_type, u64 c
}
perf_swevent_put_recursion_context(rctx);
+
+ trace_rcu_exit(rcu_flags);
}
EXPORT_SYMBOL_GPL(perf_tp_event);
Powered by blists - more mailing lists