lkml.org 
[lkml]   [2006]   [Oct]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.6.19-rc1-mm1
FromArjan van de Ven <>
DateWed, 11 Oct 2006 13:23:06 +0200
> > blocking_notifier_call_chain is> >         down_read(&nh->rwsem);
> >         ret = notifier_call_chain(&nh->head, val, v);
> >         up_read(&nh->rwsem);
> >
> > and so holds ->rwsem while calling the callback.
> > So the locking sequence ends up as:
> >
> >  down_read(&cpu_chain.rwsem);
> >  mutex_lock(&workqueue_mutex);
> >  up_read(&cpu_chain.rwsem);
> >
> >  down_read(&cpu_chain.rwsem);
> >  mutex_unlock(&workqueue_mutex);
> >  up_read(&workqueue_mutex);
> >
> > and lockdep doesn't seem to like this.  It sees workqueue_mutex
> > claimed while cpu_chain.rwsem is held. and then it sees
> > cpu_chain.rwsem claimed while workqueue_mutex is held, which looks a
> > bit like a class ABBA deadlock.
> > Of course because it is a 'down_read' rather than a 'down', it isn't
> > really a dead lock.
ok can you explain to me why "down_read" doesn't make this a deadlock
while "down" would make it a deadlock? I have trouble following your
reasoning.....
(remember that rwsems are strictly fair)


-
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-10-11 13:27    [from the cache]
©2003-2008