Re: workqueue thing

From: Johannes Berg
Date: Wed Dec 23 2009 - 03:08:00 EST


On Tue, 2009-12-22 at 10:28 -0800, Linus Torvalds wrote:
>
> On Tue, 22 Dec 2009, Peter Zijlstra wrote:
> >
> > Which in turn would imply we cannot carry fwd the current lockdep
> > annotations, right?
> >
> > Which means we'll be stuck in a situation where A flushes B and B
> > flushes A will go undetected until we actually hit it.
>
> No, lockdep should still work. It just means that waiting for an
> individual work should be seen as a matter of only waiting for the
> locks that work itself has done - rather than waiting for all the locks
> that any worker has taken.
>
> And the way the workqueue lockdep stuff is done, I'd assume this just
> automatically fixes itself when rewritten.

Yeah, you'd just have to remove the per-workqueue lockmap since that's
no longer applicable if there is, in effect, one workqueue per work item
available. We do track each work struct already.

However, I'm not sure what you (Peter) mean by "A flushes B" since flush
is a workqueue operation which appears to no longer exist after this
patchset. If struct work A tries to remove struct work B and vice versa,
it'd still be detected though, assuming the annotations are taken
forward properly of course.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part