lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 0/2] sysfs: fix s_active lockdep warning
On Fri, 5 Feb 2010, Peter Zijlstra wrote:

> Right, so this device stuff is much more complicated than I was led to
> believe ;-)

Haven't I told you all along that tree-structured locking is
complicated? :-)

> So the device core doesn't know, so how are you guys making sure there
> really are no deadlocks hidden in there somewhere?

In the code I've seen, deadlocks are avoided by always taking the locks
in the same order. But who knows? Maybe there _are_ some hidden
deadlocks lurking. For now we can't rely on lockdep to find them,
though, because it gets sidetracked by all the false positives.

> > 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?
>
> Something like the below might work, but it should go along with a
> checkpatch.pl mod to ensure we don't grow any new users (just don't feel
> like brushing up my perl fu enough to actually make sense of that
> script)

I'll try it out in the next few days, and if it looks good maybe the
checkpatch maintainers can lend some assistance before it gets
submitted.

Alan Stern



\
 
 \ /
  Last update: 2010-02-05 16:33    [W:0.095 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site