Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbYHDV4i (ORCPT ); Mon, 4 Aug 2008 17:56:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750767AbYHDVyJ (ORCPT ); Mon, 4 Aug 2008 17:54:09 -0400 Received: from host36-195-149-62.serverdedicati.aruba.it ([62.149.195.36]:35062 "EHLO mx.cpushare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbYHDVyI (ORCPT ); Mon, 4 Aug 2008 17:54:08 -0400 Date: Mon, 4 Aug 2008 23:54:02 +0200 From: Andrea Arcangeli To: Arjan van de Ven Cc: Peter Zijlstra , Dave Jones , Roland Dreier , Linus Torvalds , David Miller , jeremy@goop.org, hugh@veritas.com, mingo@elte.hu, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] workaround minor lockdep bug triggered by mm_take_all_locks Message-ID: <20080804215402.GE12464@duo.random> References: <20080804162657.GI11476@duo.random> <1217867935.3589.35.camel@twins> <20080804172728.GJ11476@duo.random> <20080804174659.GK11476@duo.random> <20080804175730.GL11476@duo.random> <1217875739.3589.56.camel@twins> <20080804201514.GB12464@duo.random> <1217882242.3589.90.camel@twins> <20080804210954.GC12464@duo.random> <20080804142752.23a59073@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080804142752.23a59073@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1681 Lines: 34 On Mon, Aug 04, 2008 at 02:27:52PM -0700, Arjan van de Ven wrote: > I think you totally misunderstand things then. > > Lockdep will report a problem if it *ever* sees a BA order after it has > seen a BA order. They don't have to happen at the same time. Or even > within hours of eachother. For me the false positive was generated by the recursive spinlock feature, not the deadlock inversion feature. If you limit my comments to the recursive spinlock feature perhaps you'll be more likely to agree with them. > They MIGHT happen... in a narrow time window, when you have a deadlock. > But lockdep will warn you about the order violation without actually > having to dealock... because the AB is likely to be done already most > of the time when the BA happens. So this is about the lock inversion feature, I admit I didn't realize it has memory that locks have been taken in AB order and spawns the first time locks have been taken in BA order. But this will lead to more false positives because there's nothing wrong to do AB BA if there's C lock taken before them! Perhaps enforcing lockdep all over the kernel is worth it just for this AB BA thing in case it doesn't only spawn false positives, but still I can't like something that is as inaccurate and prone for errors as lockdep and spreading all over the place to try to reduce the false positives it emits. I can't like that but that's just me... others clearly love it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/