From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: Deadlock scenario in regulator core Date: Fri, 25 Mar 2011 11:59:16 +0100 Message-ID: <1301050756.2250.190.camel@laptop> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from casper.infradead.org ([85.118.1.10]:40827 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314Ab1CYK5J (ORCPT ); Fri, 25 Mar 2011 06:57:09 -0400 Received: from j77219.upc-j.chello.nl ([24.132.77.219] helo=dyad.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.72 #1 (Red Hat Linux)) id 1Q34hY-0005g6-Rr for linux-arm-msm@vger.kernel.org; Fri, 25 Mar 2011 10:57:08 +0000 In-Reply-To: <20110323104230.GA778@opensource.wolfsonmicro.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Mark Brown Cc: Steven Rostedt , David Collins , Liam Girdwood , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar 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.