From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: use raw spinlocks instead of spinlocks
Date: Mon, 3 Nov 2008 02:17:35 +0100 [thread overview]
Message-ID: <c62985530811021717w169111dah4574efaf124707c2@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0811021940030.32371@gandalf.stny.rr.com>
2008/11/3 Steven Rostedt <rostedt@goodmis.org>:
> Frederic,
>
> Ingo has been very adamant about not using raw_spin_locks in the ring
> buffers. My original code did this, and he nacked it. The reason being
> (and he eventually convinced me) was that by using raw, we not only do not
> trace the locking, we also remove the lock checking. This code can easily
> produce deadlocks, so we do not want the lock checking removed.
Ok. I understand...
> The real fix is to find a way in your tracer to detect the recursion, and
> be able to prevent it. Like the atomic disables I use in ftrace. It does
> the same thing. It leaves the lockdep checking on its own locks, but can
> also detect if the lock checking caused it to recurse. When the recusion
> is detected, the tracer itself will not trace.
You mean this part in function_trace_call?
disabled = atomic_inc_return(&data->disabled);
if (likely(disabled == 1))
trace_function(tr, data, ip, parent_ip, flags, pc);
atomic_dec(&data->disabled);
That's a good idea. Since it applies on one cpu_data specific and
preempt and irq are disabled, the function
tracer doesn't risk to loose a trace. I think I will apply the same method.
Thanks!
> [ I hope this makes sense, I'm writing this on 3 hours of sleep ]
Yes, don't worry :-)
next prev parent reply other threads:[~2008-11-03 1:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 0:01 Frederic Weisbecker
2008-11-03 0:45 ` Steven Rostedt
2008-11-03 1:17 ` Frédéric Weisbecker [this message]
2008-11-03 6:46 ` Ingo Molnar
2008-11-03 13:24 ` Frédéric Weisbecker
2008-11-04 2:03 ` Frédéric Weisbecker
2008-11-04 9:43 ` Ingo Molnar
2008-11-04 11:14 ` Frédéric Weisbecker
2008-11-04 12:03 ` Ingo Molnar
2008-11-05 10:50 ` Frédéric Weisbecker
2008-11-05 10:55 ` Ingo Molnar
2008-11-06 0:41 ` Frédéric Weisbecker
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=c62985530811021717w169111dah4574efaf124707c2@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®