Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755175AbYARIRS (ORCPT ); Fri, 18 Jan 2008 03:17:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751189AbYARIRG (ORCPT ); Fri, 18 Jan 2008 03:17:06 -0500 Received: from fg-out-1718.google.com ([72.14.220.153]:31877 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbYARIRD (ORCPT ); Fri, 18 Jan 2008 03:17:03 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=NgpVBMRjpsJNbK+wJDBtvpFVIQ1cwuNHJdq2loUETvsI06+Y9ezSSHMCBh/I2KjhFMOWU1jao8ZUjODHvg0MMx9JpJkbhvrD0MZVGK1YCgH77/1SVSejR1YwHq5iPlp6+XAFiA4vur11PE9uqqXsTMiwCyCzEiiuTizT7PeoUTU= Date: Fri, 18 Jan 2008 09:23:27 +0100 From: Jarek Poplawski To: Dave Young Cc: Kay Sievers , Alan Stern , Greg KH , stefanr@s5r6.in-berlin.de, David Brownell , Kernel development list Subject: Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class Message-ID: <20080118082327.GC1703@ff.dom.local> References: <20080117203155.GA2791@ami.dom.local> <20080117232626.GC2905@ami.dom.local> <3ae72650801171755k85c4245i3b4c46a84ae8f52d@mail.gmail.com> <1200626323.5640.21.camel@lov.site> <20080118073836.GA1703@ff.dom.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1815 Lines: 42 On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote: > On Jan 18, 2008 3:38 PM, Jarek Poplawski wrote: ... > > IMHO, it would be nice to get the real state of current lockdep > > problems here to figure out if there is any chance to do this right & > > without any warnings with current lockdep. If I got it right from > > earlier threads it might be impossible with USB, at least. > > I don't think so, usb doesn't be affected by struct class mutex, they > only use the lock of struct device. As I replied before, the lockdep > issue exist only between class_interface and class_device. OK, but I've meant possibility of changing their own semaphores later. > > So, since I think these nesting levels seem to be wrong in 7/7 patch, > > maybe it's better to exclude it from this patchset, and to try this as > > testing for some time. > > I may file the updated patch with more nesting changes and test it of > course. Actually I should have done it, thanks. ... > 1) Using CLASS_NORMAL/CLASS_PARENT/CLASS_CHILD will be enough. > or > 2) Simply add SINGLE_LEVEL_NESTING in class_device_add and other > class_device functions because it is the only possible nest-lock place > as I know. If SINGLE_LEVEL_NESTING is enough? (means 2 levels total) I think you should more care about real (logical) relations here, than what's enough to get rid of lockdep warnings. Since there are not so much of these changes, you can try both variants. I'll be glad to look at this - maybe I'll mangage to figure out BTW, what it's all about... Jarek P. -- 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/