Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation
From: Peter Zijlstra
Date: Tue Aug 29 2017 - 14:47:18 EST
On Wed, Aug 30, 2017 at 01:02:39AM +0900, Byungchul Park wrote:
> On Tue, Aug 29, 2017 at 5:59 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > On Fri, Aug 25, 2017 at 10:11:14AM +0900, Byungchul Park wrote:
> >> I meant, this seems to be led from your mis-understanding of
> >> crossrelease_hist_{start, end}().
> >
> > I have, several times now, explained why PROC is special.
>
> I rather have explained why it's not, more times than you did, and you
> have not read my explanation. Anyway, I am seriously curious about
> why. Of course, I remember you said "PROC is special", but not _why_.
> I really want to know _why_ PROC(=each work) should be handled
> differently from others.
It is a question of need. We don't need more.
At points where we hold no locks and know we don't depend on prior
state, we can simply throw away history to get what we want, independent
execution.
We don't loose anything by it and its simpler. It is not much different
from that work_id thing you had previously.
And its fairly fundamental, every site where we know prior state is
irrelevant, we must not hold any locks, because at that point you
explicitly throw away dependencies (like we do for the wq thing now).
> Please show me an example except wq case
> where you just tried to avoid problems than fix them.
wq isn't broken, the annotations there are fine. The interaction between
the existing annotations and crossrelease are unfortunate but that
doesn't mean they're no good.