linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 02/10] perf, trace: Use per-tracepoint-per-cpu hlist to track events
Date: Fri, 21 May 2010 12:38:19 +0200	[thread overview]
Message-ID: <20100521103816.GG30108@nowhere> (raw)
In-Reply-To: <1274438043.1674.1699.camel@laptop>

On Fri, May 21, 2010 at 12:34:03PM +0200, Peter Zijlstra wrote:
> On Fri, 2010-05-21 at 12:21 +0200, Frederic Weisbecker wrote:
> > On Fri, May 21, 2010 at 12:19:09PM +0200, Peter Zijlstra wrote:
> > > On Fri, 2010-05-21 at 12:13 +0200, Frederic Weisbecker wrote:
> > > > > I assumed that after probe unregister a tracepoint callback doesn't
> > > > > happen, which then guarantees we should never get !head.
> > > 
> > > > I'm not sure about this. The tracepoints are called under rcu_read_lock(),
> > > > but there is not synchronize_rcu() after we unregister a tracepoint, which
> > > > means you can have a pending preempted one somewhere.
> > > > 
> > > > There is a call_rcu that removes the callbacks, but that only protect
> > > > the callback themselves. 
> > > 
> > > Ah, ok, so we should do probe_unregister + synchronize_sched().
> > > That should ensure __DO_TRACE() doesn't call into it anymore.
> > > 
> > > /me goes make a patch
> > > 
> > 
> > 
> > Yep. But that also means we need to rcu_dereference_sched() to access
> > the per cpu list of events.
> 
> Why?
> 
> The per-cpu vars are allocated and freed in a fully serialized manner,
> there should be no races what so ever.


Ah right, I was confused.


  reply	other threads:[~2010-05-21 10:38 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  9:02 [PATCH 00/10] perf tracepoint and output optimizations Peter Zijlstra
2010-05-21  9:02 ` [PATCH 01/10] perf, trace: Remove IRQ-disable from perf/tracepoint interaction Peter Zijlstra
2010-05-21 17:43   ` Frank Ch. Eigler
2010-05-21 17:53     ` Steven Rostedt
2010-05-21 18:07       ` Frank Ch. Eigler
2010-05-23 12:11   ` Paul Mackerras
2010-05-23 18:16     ` Peter Zijlstra
2010-05-24  4:29       ` Paul Mackerras
2010-05-25  8:06         ` [tip:perf/core] perf, trace: Fix IRQ-disable removal " tip-bot for Peter Zijlstra
2010-05-25  9:02           ` Peter Zijlstra
2010-05-25  9:30             ` [tip:perf/core] perf, trace: Fix !x86 build bug tip-bot for Peter Zijlstra
2010-05-24 11:31       ` [PATCH 01/10] perf, trace: Remove IRQ-disable from perf/tracepoint interaction Frederic Weisbecker
2010-05-25  7:30   ` [PATCH 01a/10] perf, trace: Fix !x86 build issue Peter Zijlstra
2010-05-21  9:02 ` [PATCH 02/10] perf, trace: Use per-tracepoint-per-cpu hlist to track events Peter Zijlstra
2010-05-21  9:40   ` Frederic Weisbecker
2010-05-21 10:02     ` Peter Zijlstra
2010-05-21 10:13       ` Frederic Weisbecker
2010-05-21 10:15         ` Peter Zijlstra
2010-05-21 10:19           ` Frederic Weisbecker
2010-05-21 10:38           ` Ingo Molnar
2010-05-21 10:51             ` Ingo Molnar
2010-05-21 10:19         ` Peter Zijlstra
2010-05-21 10:21           ` Frederic Weisbecker
2010-05-21 10:34             ` Peter Zijlstra
2010-05-21 10:38               ` Frederic Weisbecker [this message]
2010-05-21 10:41   ` [PATCH 02b/10] perf, trace: Fix probe unregister race Peter Zijlstra
2010-05-21 10:43     ` Frederic Weisbecker
2010-05-31  7:19     ` [tip:perf/urgent] perf_events, " tip-bot for Peter Zijlstra
2010-05-21 11:28   ` [tip:perf/core] perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events tip-bot for Peter Zijlstra
2010-05-21 14:04   ` [PATCH 02/10] perf, trace: Use " Steven Rostedt
2010-05-21 14:18     ` Peter Zijlstra
2010-05-21 14:25       ` Peter Zijlstra
2010-05-31  7:20         ` [tip:perf/urgent] perf_events, trace: Fix perf_trace_destroy(), mutex went missing tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 03/10] perf: Ensure IOC_OUTPUT isnt used to create multi-writer buffers Peter Zijlstra
2010-05-21 11:28   ` [tip:perf/core] perf: Ensure that IOC_OUTPUT isn't " tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 04/10] perf-record: Remove -M Peter Zijlstra
2010-05-21 11:28   ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 05/10] perf-record: Share per-cpu buffers Peter Zijlstra
2010-05-21  9:44   ` Frederic Weisbecker
2010-05-21 10:03     ` Peter Zijlstra
2010-05-21 11:29   ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 06/10] perf: Fix wakeup storm for RO mmap()s Peter Zijlstra
2010-05-21 11:29   ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 07/10] perf: Optimize perf_output_copy Peter Zijlstra
2010-05-21 11:29   ` [tip:perf/core] perf: Optimize perf_output_copy() tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 08/10] perf: Optimize the !vmalloc backed buffer Peter Zijlstra
2010-05-21 11:29   ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 09/10] perf: Remove more fastpath code Peter Zijlstra
2010-05-21 11:15   ` Steven Rostedt
2010-05-21 11:18     ` Peter Zijlstra
2010-05-21 11:30   ` [tip:perf/core] perf: Remove more code from the fastpath tip-bot for Peter Zijlstra
2010-05-21  9:02 ` [PATCH 10/10] perf: Optimize perf_tp_event_match Peter Zijlstra
2010-05-21 11:30   ` [tip:perf/core] perf: Optimize perf_tp_event_match() tip-bot for Peter Zijlstra

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=20100521103816.GG30108@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).