[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130906084238.5fc10b72@gandalf.local.home>
Date: Fri, 6 Sep 2013 08:42:38 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Tom Zanussi <tom.zanussi@...ux.intel.com>,
linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH v8 03/10] tracing: Add 'traceon' and 'traceoff' event
trigger commands
On Fri, 06 Sep 2013 21:37:58 +0900
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> wrote:
> (2013/09/06 5:46), Steven Rostedt wrote:
> > On Mon, 2 Sep 2013 22:52:19 -0500
> > Tom Zanussi <tom.zanussi@...ux.intel.com> wrote:
> >> extern void destroy_preds(struct ftrace_event_call *call);
> >> diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
> >> index 85319cf..5388d55 100644
> >> --- a/kernel/trace/trace_events_trigger.c
> >> +++ b/kernel/trace/trace_events_trigger.c
> >> @@ -28,6 +28,13 @@
> >> static LIST_HEAD(trigger_commands);
> >> static DEFINE_MUTEX(trigger_cmd_mutex);
> >>
> >> +static void
> >> +trigger_data_free(struct event_trigger_data *data)
> >> +{
> >> + synchronize_sched(); /* make sure current triggers exit before free */
> >
> > Again, I think this can and should be synchronize_rcu().
> >
>
> As in the previous patch, event triggers called under preempt disabled.
Yeah, my fault. I was thinking tracepoints used rcu_read_lock(). This
is fine.
>
> > +void event_triggers_call(struct ftrace_event_file *file)
> > +{
> > + struct event_trigger_data *data;
> > +
> > + if (list_empty(&file->triggers))
> > + return;
> > +
> > + preempt_disable_notrace();
> > + list_for_each_entry_rcu(data, &file->triggers, list)
> > + data->ops->func(data);
> > + preempt_enable_notrace();
> > +}
>
> In this case, I think synchronize_sched() is correct. Of course,
> we need to discuss why it needs to disable preempt here. :)
>
Yeah, that is confusing.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists