Re: Nested suspends; messages vs. states

David Brownell
2005-03-24T17:46:07Z

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

On Thursday 24 March 2005 9:13 am, Patrick Mochel wrote:
>
> On Thu, 24 Mar 2005, Alan Stern wrote:
>
> >
> > A large part of the concept is already coded up and part of the kernel
> > since about 2.6.9, and it works quite well. Its scope is currently
> > restricted to the USB layer; I'm proposing to make it more general.
>
> Really? And it works well? Greg, David? What do you guys think of it?

USB locking keeps tripping over the driver model. At all levels,
including driver binding, device configuration, port reset, remote
wakeup, disconnect processing, and suspend/resume. The bus rwsem
has been particularly troublesome for tree and subtree operations
(which include most of those operations I listed).

I'll be interested to hear Alan's feedback on your proposed patches.
We've kind of taken turns butting heads against the driver model,
and he's freshest.

By the way, a lock hierarchy isn't an O(N) proposition unless you're
aiming to acquire extra locks (wholesale).

- Dave

> > In fact at this stage it's more a matter for discussion under the topic
> > of driver-model development, so I'm going to stop talking about it on
> > linux-pm. You indicated that you had some relevant driver-model patches
> > -- would you like to send them to me?
>
> I apologize, I assumed you had seen them. You can find them here:
>
> http://article.gmane.org/gmane.linux.kernel/289092
>
> specifically the klist patch:
>
> http://article.gmane.org/gmane.linux.kernel/289090
>
>
> Pat