[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170905112448.GY3240@X58A-UD3R>
Date: Tue, 5 Sep 2017 20:24:48 +0900
From: Byungchul Park <byungchul.park@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Byungchul Park <max.byungchul.park@...il.com>,
Ingo Molnar <mingo@...nel.org>, Tejun Heo <tj@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, david@...morbit.com,
Johannes Berg <johannes@...solutions.net>, oleg@...hat.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel-team@....com
Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation
On Tue, Sep 05, 2017 at 12:52:36PM +0200, Peter Zijlstra wrote:
> On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote:
> > Let me show you a possible scenario with a leaf lock:
> >
> > lock(A)
> > lock(A) wait_for_completion(B)
> > unlock(A) ...
> > ... unlock(A)
> > process_one_work()
> > work->func()
> > complete(B)
> >
> > It's a deadlock by a lead lock A and completion B.
>
> By having wait_for_completion() in it, A is not a leaf lock.
I see. After all, you want to force to use only leaf locks in (1), (3)
and (5) forever in future. I really don't understand why you want to
force it and use them carefully always in head, *only* for that locks,
though original code even makes it unnecessary.
But ok...
Let's discuss the issue later if necessary.
Again, I think your patches are worth nothing but avoiding the
workqueue issue. I really hope you think it more, but it's ok if you
don't want...
Powered by blists - more mailing lists