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 01/10] tracing: Add support for SOFT_DISABLE to syscall events
Date: Fri, 06 Sep 2013 21:22:15 +0900 [thread overview]
Message-ID: <5229C8F7.7060000@hitachi.com> (raw)
In-Reply-To: <20130905120111.4900aa60@gandalf.local.home>
(2013/09/06 1:01), Steven Rostedt wrote:
> On Mon, 2 Sep 2013 22:52:17 -0500
>
>> @@ -415,10 +429,15 @@ static void unreg_event_syscall_enter(struct ftrace_event_file *file,
>> return;
>> mutex_lock(&syscall_trace_lock);
>> tr->sys_refcount_enter--;
>> - clear_bit(num, tr->enabled_enter_syscalls);
>> + rcu_assign_pointer(tr->enter_syscall_files[num], NULL);
>> if (!tr->sys_refcount_enter)
>> unregister_trace_sys_enter(ftrace_syscall_enter, tr);
>> mutex_unlock(&syscall_trace_lock);
>> + /*
>> + * Callers expect the event to be completely disabled on
>> + * return, so wait for current handlers to finish.
>> + */
>> + synchronize_sched();
>
> We only have to wait for rcu, not preemption correct? Then we need to
> do synchronize_rcu() instead.
Hmm, the reason why trace_kprobe.c uses synchronize_sched() in unreg
function, is to avoid touching freeing event_file in running kprobe
handlers which run under preemption disabled.
And AFAICS, the tracepoint (on which the syscall tracer based)
call-site uses rcu_read_lock_sched_notrace() instead of rcu_read_lock(),
in that case, I think we should use synchronize_sched(). is that wrong?
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:22 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 [this message]
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
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=5229C8F7.7060000@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox