From: Ingo Molnar <mingo@elte.hu>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] tracing/function-return-tracer: Make the function return tracer lockless
Date: Wed, 12 Nov 2008 23:15:52 +0100 [thread overview]
Message-ID: <20081112221552.GA6125@elte.hu> (raw)
In-Reply-To: <491B4F0A.3080901@gmail.com>
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> Impact: remove spinlocks and irq disabling in function return tracer.
>
> I've tried to figure out all of the race condition that could happen when
> the tracer pushes or pops a return address trace to/from the current
> thread_info.
>
> Theory:
>
> _ One thread can only execute on one cpu at a time. So this code doesn't need
> to be SMP-safe. Just drop the spinlock.
> _ The only race could happen between the current thread and an interrupt. If an
> interrupt is raised, it will increase the index of the return stack storage and
> then execute until the end of the tracing to finally free the index it used.
> We don't need to disable irqs.
>
> This is theorical. In practice, I've tested it with a two-core SMP
> and had no problem at all. Perhaps -tip testing could confirm it.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
applied to tip/tracing/function-return-tracer, thanks Frederic!
Ingo
next prev parent reply other threads:[~2008-11-12 22:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 21:47 [PATCH 1/2] tracing/function-return-tracer: Make the function return tracer lockless Frederic Weisbecker
2008-11-12 22:15 ` Ingo Molnar [this message]
2008-11-13 8:50 ` Frédéric Weisbecker
2008-11-13 8:55 ` Ingo Molnar
2008-11-13 9:16 ` Frédéric Weisbecker
2008-11-13 9:23 ` Ingo Molnar
2008-11-13 9:27 ` Frédéric Weisbecker
2008-11-13 9:40 ` Ingo Molnar
2008-11-13 12:36 ` Frédéric Weisbecker
2008-11-13 12:54 ` Ingo Molnar
2008-11-13 12:59 ` Peter Zijlstra
2008-11-13 13:02 ` Ingo Molnar
2008-11-13 17:26 ` Frédéric Weisbecker
2008-11-13 18:57 ` Ingo Molnar
2008-11-13 20:06 ` Frédéric Weisbecker
2008-11-13 14:53 ` Andi Kleen
2008-11-13 17:01 ` Frédéric Weisbecker
2008-11-13 17:12 ` Andi Kleen
2008-11-13 17:21 ` Steven Rostedt
2008-11-13 17:34 ` Andi Kleen
2008-11-13 17:32 ` Steven Rostedt
2008-11-13 17:46 ` Frédéric Weisbecker
2008-11-13 18:29 ` Andi Kleen
2008-11-13 18:35 ` Steven Rostedt
2008-11-13 18:55 ` Andi Kleen
2008-11-13 19:03 ` Steven Rostedt
2008-11-13 19:19 ` Andi Kleen
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=20081112221552.GA6125@elte.hu \
--to=mingo@elte.hu \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.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