Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation

From: Peter Zijlstra
Date: Tue Sep 05 2017 - 03:19:45 EST


On Tue, Sep 05, 2017 at 09:08:25AM +0200, Peter Zijlstra wrote:
> So you worry about max_active==1 ? Or you worry about pool->lock or
> about the thread setup? I'm still not sure.

So the thing about pool->lock is that its a leaf lock, we take nothing
inside it. Futhermore its a spinlock and therefore blocking things like
completions or page-lock cannot form a deadlock with it.

It is also fully isolated inside workqueue.c and easy to audit.

This is why I really can't be arsed about it.


And the whole setup stuff isn't properly preserved between works in any
case, only the first few works would ever see that history, so why
bother.


We _could_ save/restore the setup history, by doing a complete copy of
it and restoring that, but that's not what crossrelease did, and I
really don't see the point.