From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection
Date: Thu, 16 Apr 2009 19:20:07 +0200 [thread overview]
Message-ID: <1239902407.23397.3197.camel@laptop> (raw)
In-Reply-To: <alpine.DEB.2.00.0904161259460.20429@gandalf.stny.rr.com>
On Thu, 2009-04-16 at 13:03 -0400, Steven Rostedt wrote:
> On Thu, 16 Apr 2009, Peter Zijlstra wrote:
>
> > On Thu, 2009-04-16 at 12:15 -0400, Steven Rostedt wrote:
> > > plain text document attachment
> > > (0002-tracing-events-lockdep-move-tracepoints-within-recu.patch)
> > > From: Steven Rostedt <srostedt@redhat.com>
> > >
> > > With the current location of the tracepoints in lockdep, the system
> > > can hard lockup in minutes when the tracepoints are enabled.
> > >
> > > Moving the tracepoints outside inside the lockdep protection solves
> > > the issue.
> >
> > NAK
> >
> > the idea is to eventually move lockdep on top of the tracepoints. The
> > tracer should grow to be more robust and handle recursion itself.
> >
> > Its likely a case of the tracer using a spinlock or mutex in the
> > tracepoint code. When I did the tracepoints I converted one such to a
> > raw_spinlock_t in the trace_print code.
>
> Note, that the ring buffer and events are made to be recursive. That is,
> it allows one event to trace within another event.
But surely not in the same context. You could do a 4 level recursion
protection like I did in perf-counter, not allowing recursion in:
nmi, irq, softirq, process - context.
That allows you to trace an irq while you're tracing something in
process context, etc.. But not allow recursion on the same level.
> If the tracepoint is
> triggered by something within the trace point handler, then we are
> screwed. That needs to be fixed.
Exactly the thing you want to detect and warn about, preferably with a
nice stack trace.
> I have not seen what is triggering back into locking. The ring buffer and
> what I can see by the event code, does not grab any locks besides raw
> ones.
Well, it used to all work, so something snuck in.
next prev parent reply other threads:[~2009-04-16 17:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 16:15 [PATCH 0/2] [GIT PULL] updates for event tester and lockdep tracer Steven Rostedt
2009-04-16 16:15 ` [PATCH 1/2] tracing/events: perform function tracing in event selftests Steven Rostedt
2009-04-17 16:10 ` [tip:tracing/core] " tip-bot for Steven Rostedt
2009-04-16 16:15 ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Steven Rostedt
2009-04-16 16:47 ` Peter Zijlstra
2009-04-16 17:03 ` Steven Rostedt
2009-04-16 17:20 ` Peter Zijlstra [this message]
2009-04-16 17:38 ` Steven Rostedt
2009-04-16 17:49 ` Peter Zijlstra
2009-04-16 17:58 ` Steven Rostedt
2009-04-16 18:06 ` Peter Zijlstra
2009-04-16 18:12 ` Steven Rostedt
2009-04-16 18:29 ` Mathieu Desnoyers
2009-04-16 18:22 ` Mathieu Desnoyers
2009-04-16 17:45 ` Steven Rostedt
2009-04-16 17:53 ` Peter Zijlstra
2009-04-17 3:03 ` Steven Rostedt
2009-04-17 3:24 ` Steven Rostedt
2009-04-17 7:40 ` Peter Zijlstra
2009-04-17 16:03 ` [tip:core/urgent] lockdep: more robust lockdep_map init sequence tip-bot for Peter Zijlstra
2009-04-17 4:16 ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Steven Rostedt
2009-04-17 4:36 ` Steven Rostedt
2009-04-17 4:52 ` Mathieu Desnoyers
2009-04-17 11:09 ` Steven Rostedt
2009-04-17 22:19 ` [PATCH] x86 entry_64.S lockdep fix Mathieu Desnoyers
2009-04-18 13:54 ` Steven Rostedt
2009-04-19 4:11 ` Mathieu Desnoyers
2009-04-19 9:10 ` Ingo Molnar
2009-04-17 7:44 ` [PATCH 2/2] tracing/events/lockdep: move tracepoints within recursive protection Peter Zijlstra
2009-04-16 16:40 ` [PATCH 0/2] [GIT PULL] updates for event tester and lockdep tracer 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=1239902407.23397.3197.camel@laptop \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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