From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH v8 03/10] tracing: Add 'traceon' and 'traceoff' event trigger commands
Date: Fri, 06 Sep 2013 21:37:58 +0900 [thread overview]
Message-ID: <5229CCA6.2060105@hitachi.com> (raw)
In-Reply-To: <20130905164621.40f92270@gandalf.local.home>
(2013/09/06 5:46), Steven Rostedt wrote:
> On Mon, 2 Sep 2013 22:52:19 -0500
> Tom Zanussi <tom.zanussi@linux.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.
> +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. :)
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2013-09-06 12:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 3:52 [PATCH v8 00/10] tracing: trace event triggers Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 01/10] tracing: Add support for SOFT_DISABLE to syscall events Tom Zanussi
[not found] ` <20130905120111.4900aa60@gandalf.local.home>
2013-09-06 12:22 ` Masami Hiramatsu
2013-09-06 12:41 ` Steven Rostedt
2013-09-03 3:52 ` [PATCH v8 02/10] tracing: Add basic event trigger framework Tom Zanussi
2013-09-05 17:21 ` Steven Rostedt
2013-09-06 14:25 ` Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 03/10] tracing: Add 'traceon' and 'traceoff' event trigger commands Tom Zanussi
[not found] ` <20130905164621.40f92270@gandalf.local.home>
2013-09-06 12:37 ` Masami Hiramatsu [this message]
2013-09-06 12:42 ` Steven Rostedt
2013-09-03 3:52 ` [PATCH v8 04/10] tracing: Add 'snapshot' event trigger command Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 05/10] tracing: Add 'stacktrace' " Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 06/10] tracing: Add 'enable_event' and 'disable_event' event trigger commands Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 07/10] tracing: Add and use generic set_trigger_filter() implementation Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 08/10] tracing: Update event filters for multibuffer Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 09/10] tracing: Add documentation for trace event triggers Tom Zanussi
2013-09-03 3:52 ` [PATCH v8 10/10] tracing: Make register/unregister_ftrace_command __init Tom Zanussi
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=5229CCA6.2060105@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=tom.zanussi@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.