LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org
Subject: Re: bug: ftrace & lockdep badness
Date: Wed, 5 Nov 2008 12:13:01 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.1.10.0811051212050.12839@gandalf.stny.rr.com> (raw)
In-Reply-To: <20081105170836.GA8317@elte.hu>


On Wed, 5 Nov 2008, Ingo Molnar wrote:
> > > 
> > > > This is the type of problems we deal with when we have the tracer 
> > > > tracing lockdep code at the same time the lockdep code is checking 
> > > > the tracer.
> > > 
> > > ok ... you are right, i guess we need to go back to raw locks after 
> > > all?
> > 
> > I do like the fact that lockdep checks it too. But there's times 
> > that we can not do that.
> > 
> > Perhaps we can do something in between.
> > 
> > Make a rb_spin_lock macro inside ring_buffer.c that can be either a 
> > spin_lock or a raw_spin_lock.  There are some tracers that must have 
> > this as a raw (function trace, irqsoff and preemptoff), but the rest 
> > should be fine. We can make it where the rb_spin_lock is a raw lock 
> > when any of those three tracers are configured, and make it into a 
> > normal lock when they are not.
> > 
> > This way we can still test the integrity of the ring_buffer for 
> > other tracers. We just need to be careful when we are using function 
> > tracing or irqs/preempt off tracing. But we need to be careful with 
> > those anyway.
> 
> i'd rather we not complicate this anymore and just go for raw locks 
> unconditionally - or no raw locks unconditionally.

OK, agree. We can have a debug patch that converts it back to normal 
spinlocks that we can apply when we want to test it. But for release, we 
just keep the raw_spin_locks.

-- Steve


      reply	other threads:[~2008-11-05 17:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 12:37 Heiko Carstens
2008-11-05 13:07 ` Steven Rostedt
2008-11-05 16:04 ` Steven Rostedt
2008-11-05 16:30   ` Ingo Molnar
2008-11-05 16:47     ` Steven Rostedt
2008-11-05 17:01       ` Frédéric Weisbecker
2008-11-05 17:08       ` Ingo Molnar
2008-11-05 17:13         ` Steven Rostedt [this message]

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=alpine.DEB.1.10.0811051212050.12839@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --subject='Re: bug: ftrace & lockdep badness' \
    /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

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).