From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: masami.hiramatsu.pt@hitachi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 01/10] tracing: Add support for SOFT_DISABLE to syscall events
Date: Tue, 27 Aug 2013 18:32:16 -0500 [thread overview]
Message-ID: <1377646336.15688.55.camel@empanada> (raw)
In-Reply-To: <20130827160827.1661a056@gandalf.local.home>
On Tue, 2013-08-27 at 16:08 -0400, Steven Rostedt wrote:
> On Tue, 27 Aug 2013 14:40:13 -0500
> Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
>
> > @@ -415,9 +429,14 @@ 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);
> > + /*
> > + * Callers expect the event to be completely disabled on
> > + * return, so wait for current handlers to finish.
> > + */
> > + synchronize_sched();
> > mutex_unlock(&syscall_trace_lock);
> > }
> >
> > @@ -435,7 +454,7 @@ static int reg_event_syscall_exit(struct ftrace_event_file *file,
> > if (!tr->sys_refcount_exit)
> > ret = register_trace_sys_exit(ftrace_syscall_exit, tr);
> > if (!ret) {
> > - set_bit(num, tr->enabled_exit_syscalls);
> > + rcu_assign_pointer(tr->exit_syscall_files[num], file);
> > tr->sys_refcount_exit++;
> > }
> > mutex_unlock(&syscall_trace_lock);
> > @@ -453,9 +472,14 @@ static void unreg_event_syscall_exit(struct ftrace_event_file *file,
> > return;
> > mutex_lock(&syscall_trace_lock);
> > tr->sys_refcount_exit--;
> > - clear_bit(num, tr->enabled_exit_syscalls);
> > + rcu_assign_pointer(tr->exit_syscall_files[num], NULL);
> > if (!tr->sys_refcount_exit)
> > unregister_trace_sys_exit(ftrace_syscall_exit, tr);
> > + /*
> > + * Callers expect the event to be completely disabled on
> > + * return, so wait for current handlers to finish.
> > + */
> > + synchronize_sched();
> > mutex_unlock(&syscall_trace_lock);
>
> Can we do the synchronize_sched() after the mutex unlock in these two
> places?
>
Yeah, I think that should be ok and there should be no need to delay
waiters for that mutex - I'll look at moving it out for the next
revision.
Thanks,
Tom
> -- Steve
>
>
> > }
> >
>
next prev parent reply other threads:[~2013-08-27 23:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 19:40 [PATCH v7 00/10] tracing: trace event triggers (repost) Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 01/10] tracing: Add support for SOFT_DISABLE to syscall events Tom Zanussi
2013-08-27 20:01 ` Steven Rostedt
2013-08-27 23:29 ` Tom Zanussi
2013-08-27 23:41 ` Steven Rostedt
2013-08-27 20:08 ` Steven Rostedt
2013-08-27 23:32 ` Tom Zanussi [this message]
2013-08-27 19:40 ` [PATCH v7 02/10] tracing: add basic event trigger framework Tom Zanussi
2013-08-27 20:15 ` Steven Rostedt
2013-08-27 23:38 ` Tom Zanussi
2013-08-27 20:17 ` Steven Rostedt
2013-08-27 19:40 ` [PATCH v7 03/10] tracing: add 'traceon' and 'traceoff' event trigger commands Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 04/10] tracing: add 'snapshot' event trigger command Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 05/10] tracing: add 'stacktrace' " Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 06/10] tracing: add 'enable_event' and 'disable_event' event trigger commands Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 07/10] tracing: add and use generic set_trigger_filter() implementation Tom Zanussi
2013-08-28 16:38 ` Steven Rostedt
2013-08-29 2:52 ` Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 08/10] tracing: update event filters for multibuffer Tom Zanussi
2013-08-28 18:00 ` Steven Rostedt
2013-08-27 19:40 ` [PATCH v7 09/10] tracing: add documentation for trace event triggers Tom Zanussi
2013-08-27 19:40 ` [PATCH v7 10/10] tracing: make register/unregister_ftrace_command __init Tom Zanussi
2013-08-28 1:28 ` [PATCH v7 00/10] tracing: trace event triggers (repost) Masami Hiramatsu
2013-08-28 19:51 ` Steven Rostedt
2013-08-29 2:54 ` Tom Zanussi
-- strict thread matches above, loose matches on Subject: below --
2013-08-27 3:55 [PATCH v7 00/10] tracing: trace event triggers Tom Zanussi
2013-08-27 3:55 ` [PATCH v7 01/10] tracing: Add support for SOFT_DISABLE to syscall events 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=1377646336.15688.55.camel@empanada \
--to=tom.zanussi@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=rostedt@goodmis.org \
/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