linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: rostedt <rostedt@goodmis.org>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	"Joel Fernandes, Google" <joel@joelfernandes.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	paulmck <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>
Subject: Re: [PATCH 6/8] perf,tracing: Prepare the perf-trace interface for RCU changes
Date: Wed, 12 Feb 2020 10:07:51 -0500 (EST)	[thread overview]
Message-ID: <736090577.117.1581520071732.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20200212092655.4ba6cd79@gandalf.local.home>

----- On Feb 12, 2020, at 9:26 AM, rostedt rostedt@goodmis.org wrote:

> On Wed, 12 Feb 2020 10:32:16 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
> 
>> 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@goodmis.org>

and

Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks :)

Mathieu

> 
>  ;-)
> 
> -- Steve
> 
>> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.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);
>>  

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2020-02-12 15:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  9:32 [PATCH 0/8] tracing vs rcu vs nmi Peter Zijlstra
2020-02-12  9:32 ` [PATCH 1/8] rcu: Rename rcu_irq_{enter,exit}_irqson() Peter Zijlstra
2020-02-12  9:32 ` [PATCH 2/8] rcu: Mark rcu_dynticks_curr_cpu_in_eqs() inline Peter Zijlstra
2020-02-12  9:32 ` [PATCH 3/8] rcu,tracing: Create trace_rcu_{enter,exit}() Peter Zijlstra
2020-02-12  9:32 ` [PATCH 4/8] sched,rcu,tracing: Mark preempt_count_{add,sub}() notrace Peter Zijlstra
2020-02-12 14:24   ` Steven Rostedt
2020-02-12 15:02     ` Peter Zijlstra
2020-02-12 15:14       ` Steven Rostedt
2020-02-12 15:38         ` Peter Zijlstra
2020-02-12  9:32 ` [PATCH 5/8] x86,tracing: Mark debug_stack_{set_zero,reset)() notrace Peter Zijlstra
2020-02-12 14:25   ` Steven Rostedt
2020-02-12 15:04     ` Peter Zijlstra
2020-02-12 15:18       ` Steven Rostedt
2020-02-12 15:39         ` Peter Zijlstra
2020-02-12  9:32 ` [PATCH 6/8] perf,tracing: Prepare the perf-trace interface for RCU changes Peter Zijlstra
2020-02-12 14:26   ` Steven Rostedt
2020-02-12 15:07     ` Mathieu Desnoyers [this message]
2020-02-12  9:32 ` [PATCH 7/8] tracing: Employ trace_rcu_{enter,exit}() Peter Zijlstra
2020-02-12  9:32 ` [PATCH 8/8] tracing: Remove regular RCU context for _rcuidle tracepoints (again) Peter Zijlstra
2020-02-12 14:29   ` Steven Rostedt
2020-02-12 15:12     ` Peter Zijlstra
2020-02-12 10:01 ` [PATCH 0/8] tracing vs rcu vs nmi Peter Zijlstra
2020-02-12 10:56   ` Will Deacon
2020-02-12 11:58     ` Peter Zijlstra
2020-02-12 14:32     ` Steven Rostedt
2020-02-12 15:21       ` Peter Zijlstra
2020-02-12 10:03 ` Peter Zijlstra
2020-02-12 10:07 ` Peter Zijlstra
2020-02-12 10:09 ` Peter Zijlstra

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=736090577.117.1581520071732.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH 6/8] perf,tracing: Prepare the perf-trace interface for RCU changes' \
    /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

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).