Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1721062 > unrolled thread

Re: [RFC] workqueue: remove manual lockdep uses to detect deadlocks

Started byPeter Zijlstra <peterz@infradead.org>
First post2017-08-28 09:00 +0200
Last post2017-08-29 03:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC] workqueue: remove manual lockdep uses to detect deadlocks Peter Zijlstra <peterz@infradead.org> - 2017-08-28 09:00 +0200
    Re: [RFC] workqueue: remove manual lockdep uses to detect deadlocks Byungchul Park <max.byungchul.park@gmail.com> - 2017-08-28 13:00 +0200
    Re: [RFC] workqueue: remove manual lockdep uses to detect deadlocks Byungchul Park <byungchul.park@lge.com> - 2017-08-29 03:00 +0200

#1721062 — Re: [RFC] workqueue: remove manual lockdep uses to detect deadlocks

FromPeter Zijlstra <peterz@infradead.org>
Date2017-08-28 09:00 +0200
SubjectRe: [RFC] workqueue: remove manual lockdep uses to detect deadlocks
Message-ID<ujmbD-2dY-1@gated-at.bofh.it>
On Fri, Aug 25, 2017 at 05:41:03PM +0900, Byungchul Park wrote:
> Hello all,
> 
> This is _RFC_.
> 
> I want to request for comments about if it's reasonable conceptually. If
> yes, I want to resend after working it more carefully.
> 
> Could you let me know your opinions about this?
> 
> ----->8-----
> From 448360c343477fff63df766544eec4620657a59e Mon Sep 17 00:00:00 2001
> From: Byungchul Park <byungchul.park@lge.com>
> Date: Fri, 25 Aug 2017 17:35:07 +0900
> Subject: [RFC] workqueue: remove manual lockdep uses to detect deadlocks
> 
> We introduced the following commit to detect deadlocks caused by
> wait_for_completion() in flush_{workqueue, work}() and other locks. But
> now LOCKDEP_COMPLETIONS is introduced, such works are automatically done
> by LOCKDEP_COMPLETIONS. So it doesn't have to be done manually anymore.
> Removed it.
> 

No.. the existing annotation is strictly better because it will _always_
warn. It doesn't need to first observe things just right.

[toc] | [next] | [standalone]


#1721509

FromByungchul Park <max.byungchul.park@gmail.com>
Date2017-08-28 13:00 +0200
Message-ID<ujpVU-4AQ-9@gated-at.bofh.it>
In reply to#1721062
On Mon, Aug 28, 2017 at 3:55 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, Aug 25, 2017 at 05:41:03PM +0900, Byungchul Park wrote:
>> Hello all,
>>
>> This is _RFC_.
>>
>> I want to request for comments about if it's reasonable conceptually. If
>> yes, I want to resend after working it more carefully.
>>
>> Could you let me know your opinions about this?
>>
>> ----->8-----
>> From 448360c343477fff63df766544eec4620657a59e Mon Sep 17 00:00:00 2001
>> From: Byungchul Park <byungchul.park@lge.com>
>> Date: Fri, 25 Aug 2017 17:35:07 +0900
>> Subject: [RFC] workqueue: remove manual lockdep uses to detect deadlocks
>>
>> We introduced the following commit to detect deadlocks caused by
>> wait_for_completion() in flush_{workqueue, work}() and other locks. But
>> now LOCKDEP_COMPLETIONS is introduced, such works are automatically done
>> by LOCKDEP_COMPLETIONS. So it doesn't have to be done manually anymore.
>> Removed it.
>>
>
> No.. the existing annotation is strictly better because it will _always_
> warn. It doesn't need to first observe things just right.

Right. That is exactly why I replied to TJ like:

https://lkml.org/lkml/2017/8/25/490

-- 
Thanks,
Byungchul

[toc] | [prev] | [next] | [standalone]


#1722090

FromByungchul Park <byungchul.park@lge.com>
Date2017-08-29 03:00 +0200
Message-ID<ujD2O-45F-17@gated-at.bofh.it>
In reply to#1721062
On Mon, Aug 28, 2017 at 08:55:53AM +0200, Peter Zijlstra wrote:
> On Fri, Aug 25, 2017 at 05:41:03PM +0900, Byungchul Park wrote:
> > Hello all,
> > 
> > This is _RFC_.
> > 
> > I want to request for comments about if it's reasonable conceptually. If
> > yes, I want to resend after working it more carefully.
> > 
> > Could you let me know your opinions about this?
> > 
> > ----->8-----
> > From 448360c343477fff63df766544eec4620657a59e Mon Sep 17 00:00:00 2001
> > From: Byungchul Park <byungchul.park@lge.com>
> > Date: Fri, 25 Aug 2017 17:35:07 +0900
> > Subject: [RFC] workqueue: remove manual lockdep uses to detect deadlocks
> > 
> > We introduced the following commit to detect deadlocks caused by
> > wait_for_completion() in flush_{workqueue, work}() and other locks. But
> > now LOCKDEP_COMPLETIONS is introduced, such works are automatically done
> > by LOCKDEP_COMPLETIONS. So it doesn't have to be done manually anymore.
> > Removed it.
> > 
> 
> No.. the existing annotation is strictly better because it will _always_
> warn. It doesn't need to first observe things just right.

In addition, the existing annotation is never good, but just able to
detect deadlocks aggresively. However, it's inevitable to create false
dependencies. I mean some dependencies between work/wq and any locks
inside of each work might be false ones sometimes.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web