[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1002041322390.1261-100000@iolanthe.rowland.org>
Date: Thu, 4 Feb 2010 13:37:03 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Peter Zijlstra <peterz@...radead.org>
cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
Greg KH <gregkh@...e.de>, Thomas Gleixner <tglx@...utronix.de>,
Cong Wang <amwang@...hat.com>,
Kernel development list <linux-kernel@...r.kernel.org>,
Tejun Heo <tj@...nel.org>, Miles Lane <miles.lane@...il.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Larry Finger <Larry.Finger@...inger.net>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Patch 0/2] sysfs: fix s_active lockdep warning
On Thu, 4 Feb 2010, Peter Zijlstra wrote:
> > This doesn't address the fact that we really have multiple device trees
> > (for example, class devices are handled separately from normal
> > devices). With the above patch installed, I still get lockdep
> > violations farther on during boot:
>
> <snip lockdep splat>
>
> Hmm, so you have multiple interacting trees? I had understood you only
> had a single device tree.
The real situation is kind of complicated, and I'm not familiar with
all the details. But it's certainly true that a driver will want to
work with (and lock!) multiple struct device's that don't have a
parent-child relation in the tree. The simplest example is regular
devices together with class devices, and another might be PCI devices
together with their "shadow" ACPI devices.
> So how many trees are there, is that fixed?
> Does the device know what tree it is going to end up in?
The driver generally knows, but AFAIK that information is not passed
back to the driver core. At least, not directly -- you might say that
it could be deduced from the parent pointer, assuming the core already
knows all about the parent.
> If yes, then you can extend the setup_mutex_depth() function to pick a
> different class stack for each tree.
Maybe this could be done. But for now perhaps a compromise is in
order. We could make the switch from semaphores to mutexes while
avoiding lockdep issues by assigning the device mutexes to a
"don't-verify" class. Is there such a thing, or could it be added?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists