From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755992AbYKERNR (ORCPT ); Wed, 5 Nov 2008 12:13:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752826AbYKERNG (ORCPT ); Wed, 5 Nov 2008 12:13:06 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:39317 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752350AbYKERNE (ORCPT ); Wed, 5 Nov 2008 12:13:04 -0500 Date: Wed, 5 Nov 2008 12:13:01 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Ingo Molnar cc: Heiko Carstens , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: bug: ftrace & lockdep badness In-Reply-To: <20081105170836.GA8317@elte.hu> Message-ID: References: <20081105123714.GA23504@osiris.boeblingen.de.ibm.com> <20081105163052.GA28884@elte.hu> <20081105170836.GA8317@elte.hu> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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