lkml.org 
[lkml]   [2017]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation
On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote:
> Recursive-read and the hint I proposed(a.k.a. might) should be used for
> their different specific applications. Both meaning and constraints of
> them are totally different.
>
> Using a right function semantically is more important than making it
> just work, as you know. Wrong?

For example, _semantically_:

lock(A) -> recursive-read(A), end in a deadlock, while
lock(A) -> might(A) , is like nothing.

recursive-read(A) -> might(A), is like nothing, while
might(A) -> recursive-read(A), end in a deadlock.

And so on...

Of course, in the following cases, the results are same:

recursive-read(A) -> recursive-read(A), is like nothing, and also
might(A) -> might(A) , is like nothing.

recursive-read(A) -> lock(A), end in a deadlock, and also
might(A) -> lock(A), end in a deadlock.

Futhermore, recursive-read-might() can be used if needed, since their
semantics are orthogonal so they can be used in mixed forms.

I really hope you accept the new semantics... I think current workqueue
code exactly needs the semantics.

\
 
 \ /
  Last update: 2017-09-05 12:59    [W:0.143 / U:1.288 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site