lkml.org 
[lkml]   [2006]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Lockdep message on workqueue_mutex
On Tue, 22 Aug 2006 15:53:27 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> On Tue, Aug 22, 2006 at 02:36:32PM +0200, Arjan van de Ven wrote:
> > On Tue, 2006-08-22 at 14:10 +0200, Heiko Carstens wrote:
> > > git commit 9b41ea7289a589993d3daabc61f999b4147872c4 causes the lockdep
> > > message below on cpu hotplug (git kernel of today).
> > >
> > > We have:
> > >
> > > cpu_down (takes cpu_add_remove_lock)
> > > [CPU_DOWN_PREPARE]
> > > blocking_notifier_call_chain (takes (cpu_chain).rwsem)
> > > workqueue_cpu_callback (takes workqueue_mutex)
> > > blocking_notifier_call_chain (releases (cpu_chain).rwsem)
> > > [CPU_DEAD]
> > > blocking_notifier_call_chain (takes (cpu_chain).rwsem)
> > > ^^^^^^^^^^^^^^^^^^^^^^^
> > > -> reverse locking order, since we still hold workqueue_mutex.
> > >
> > > But since all of this is protected by the cpu_add_remove_lock this looks
> > > legal. Well, at least it's safe as long as no other cpu callback function
> > > does anything that will take the workqueue_mutex as well.
> >
> > so you're saying this locking is entirely redundant ? ;-)
>
> No, I'm just saying that I think that it currently cannot deadlock. But I
> think the workqueue cpu hotplug code should be changed, so that it doesn't
> return with the workqueue_mutex being held.

That's deliberate: it's to prevent the workqueue code from walking
cpu_online_map while it is in the process of being changed.
-
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/

\
 
 \ /
  Last update: 2006-08-22 16:39    [W:0.039 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site