Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756838Ab1CYK5N (ORCPT ); Fri, 25 Mar 2011 06:57:13 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:52495 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754363Ab1CYK5L (ORCPT ); Fri, 25 Mar 2011 06:57:11 -0400 Subject: Re: Deadlock scenario in regulator core From: Peter Zijlstra To: Mark Brown Cc: Steven Rostedt , David Collins , Liam Girdwood , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar In-Reply-To: <20110323104230.GA778@opensource.wolfsonmicro.com> References: <4D891C59.1030009@codeaurora.org> <20110322223702.GO14675@home.goodmis.org> <4D892C0A.1090606@codeaurora.org> <1300835998.14261.13.camel@gandalf.stny.rr.com> <20110323000100.GB2529@opensource.wolfsonmicro.com> <1300840734.14261.72.camel@gandalf.stny.rr.com> <20110323104230.GA778@opensource.wolfsonmicro.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Mar 2011 11:59:16 +0100 Message-ID: <1301050756.2250.190.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 768 Lines: 20 On Wed, 2011-03-23 at 10:42 +0000, Mark Brown wrote: > > That's helpful, though it doesn't really say anything about how one > picks subclass? With care ;-) Its most useful for recursive use of the same lock class, typically we only have 2 locks held and we can use the SINGLE_DEPTH_NESTING thing. Some few sites use subclasses for larger things, some are ok, some are dubious (ext4 comes to mind). And like said in the other email, be careful with lockdep annotations, you can actually annotate real deadlocks away. -- 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/