lkml.org 
[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/9] perf,tracing: Prepare the perf-trace interface for RCU changes
On Wed, Feb 12, 2020 at 06:28:30PM -0500, Joel Fernandes wrote:
> On Wed, Feb 12, 2020 at 10:01:45PM +0100, Peter Zijlstra 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>
> > Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > 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;
>
> The flags are not needed I guess, if you agree on not using in_nmi() in
> trace_rcu_enter().

Even then we need to store the state: 'didn't do nothing' vs 'did call
rcu_needs_to_wake_up_and_pay_attention_noaw'. That is, we only need to
do something (expensive!) when !rcu_is_watching().

\
 
 \ /
  Last update: 2020-02-13 09:30    [W:0.049 / U:6.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site