public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Li Zefan <lizf@cn.fujitsu.com>
Subject: Re: [PATCH 01/12] perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
Date: Mon, 2 Aug 2010 11:14:46 -0400	[thread overview]
Message-ID: <20100802151445.GA11747@Krystal> (raw)
In-Reply-To: <1280707993-6599-2-git-send-regression-fweisbec@gmail.com>

* Frederic Weisbecker (fweisbec@gmail.com) wrote:
> We use synchronize_sched() to ensure a tracepoint won't be called
> while/after we release the perf buffers it references.
> 
> But the tracepoint API has its own API for that:
> tracepoint_synchronize_unregister(). Use it instead as it's
> self-explanatory and eases maintainance.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks!

Mathieu

> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> ---
>  kernel/trace/trace_event_perf.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> index 2375165..000e6e8 100644
> --- a/kernel/trace/trace_event_perf.c
> +++ b/kernel/trace/trace_event_perf.c
> @@ -131,10 +131,10 @@ void perf_trace_destroy(struct perf_event *p_event)
>  	tp_event->class->reg(tp_event, TRACE_REG_PERF_UNREGISTER);
>  
>  	/*
> -	 * Ensure our callback won't be called anymore. See
> -	 * tracepoint_probe_unregister() and __DO_TRACE().
> +	 * Ensure our callback won't be called anymore. The buffers
> +	 * will be freed after that.
>  	 */
> -	synchronize_sched();
> +	tracepoint_synchronize_unregister();
>  
>  	free_percpu(tp_event->perf_events);
>  	tp_event->perf_events = NULL;
> -- 
> 1.6.2.3
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2010-08-02 15:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  0:13 [GIT PULL] instrumentation updates Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 01/12] perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call Frederic Weisbecker
2010-08-02 15:14   ` Mathieu Desnoyers [this message]
2010-08-02  0:13 ` [PATCH 02/12] tracing: Drop cpparg() macro Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 03/12] perf: New migration tool overview Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 04/12] perf, sched migration: Handle ignored migrate out events Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 05/12] perf, sched migration: Ignore unhandled task states Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 06/12] perf, sched migration: Fix key bindings Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 07/12] perf, sched migration: Parameterize cpu height and spacing Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 08/12] perf, sched migration: Make it vertically scrollable Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 09/12] perf, sched migration: Make the GUI class client agnostic Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 10/12] perf, sched migration: Librarize the GUI class Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 11/12] perf, sched migration: Librarize task states and event headers helpers Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 12/12] x86,mmiotrace: Add support for tracing STOS instruction Frederic Weisbecker
2010-08-02  6:28 ` [GIT PULL] instrumentation updates Ingo Molnar

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=20100802151445.GA11747@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --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