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

2017-09-06 Thread Byungchul Park
On Wed, Sep 06, 2017 at 10:32:54AM +0900, Byungchul Park wrote: > > What do you mean by "false dependencies"? AFAICT, recursive-read could > > All locks used in every work->func() generate false dependencies with > 'work' and 'wq', while any flush works are not involved. It's inevitable. > >

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

2017-09-06 Thread Byungchul Park
On Wed, Sep 06, 2017 at 10:32:54AM +0900, Byungchul Park wrote: > > What do you mean by "false dependencies"? AFAICT, recursive-read could > > All locks used in every work->func() generate false dependencies with > 'work' and 'wq', while any flush works are not involved. It's inevitable. > >

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

2017-09-06 Thread Byungchul Park
On Wed, Sep 06, 2017 at 10:32:54AM +0900, Byungchul Park wrote: > Moreover, it's also possible to generate more false ones between the > pseudo acquisitions, if real acquisitions are used for that speculative > purpose e.i. recursive-read here, which are anyway real ones. Of course, this problem

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

2017-09-06 Thread Byungchul Park
On Wed, Sep 06, 2017 at 10:32:54AM +0900, Byungchul Park wrote: > Moreover, it's also possible to generate more false ones between the > pseudo acquisitions, if real acquisitions are used for that speculative > purpose e.i. recursive-read here, which are anyway real ones. Of course, this problem

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

2017-09-05 Thread Byungchul Park
On Wed, Sep 06, 2017 at 08:42:11AM +0800, Boqun Feng wrote: > > OK. If the workqueue is only user of the weird lockdep annotations, then > > it might be better to defer introducing the extra state until needed. > > > > But, the 'might' thing I introduced would be necessary if more users > > want

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

2017-09-05 Thread Byungchul Park
On Wed, Sep 06, 2017 at 08:42:11AM +0800, Boqun Feng wrote: > > OK. If the workqueue is only user of the weird lockdep annotations, then > > it might be better to defer introducing the extra state until needed. > > > > But, the 'might' thing I introduced would be necessary if more users > > want

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > 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

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > 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

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

2017-09-05 Thread Boqun Feng
On Wed, Sep 06, 2017 at 08:52:35AM +0900, Byungchul Park wrote: > On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > > On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote: > > > > Recursive-read and the

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

2017-09-05 Thread Boqun Feng
On Wed, Sep 06, 2017 at 08:52:35AM +0900, Byungchul Park wrote: > On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > > On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote: > > > > Recursive-read and the

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > 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

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > > 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

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > 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

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > 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

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

2017-09-05 Thread Byungchul Park
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)

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

2017-09-05 Thread Byungchul Park
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)

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

2017-09-05 Thread Byungchul Park
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

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

2017-09-05 Thread Byungchul Park
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

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

2017-09-05 Thread Peter Zijlstra
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() >

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

2017-09-05 Thread Peter Zijlstra
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() >

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 11:36:24AM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 05:57:27PM +0900, Byungchul Park wrote: > > On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > > > On Tue, Sep 05, 2017 at 09:08:25AM +0200, Peter Zijlstra wrote: > > > > So you worry about

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 11:36:24AM +0200, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 05:57:27PM +0900, Byungchul Park wrote: > > On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > > > On Tue, Sep 05, 2017 at 09:08:25AM +0200, Peter Zijlstra wrote: > > > > So you worry about

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 05:57:27PM +0900, Byungchul Park wrote: > On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > > 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

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 05:57:27PM +0900, Byungchul Park wrote: > On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > > 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

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > 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

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 09:19:30AM +0200, Peter Zijlstra wrote: > 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

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 09:08:25AM +0200, Peter Zijlstra wrote: > > Your patches only do avoiding the wq issue now we focus on. > > > > Look at: > > > > worker thread another context > > - --- > >

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

2017-09-05 Thread Byungchul Park
On Tue, Sep 05, 2017 at 09:08:25AM +0200, Peter Zijlstra wrote: > > Your patches only do avoiding the wq issue now we focus on. > > > > Look at: > > > > worker thread another context > > - --- > >

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

2017-09-05 Thread Peter Zijlstra
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

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

2017-09-05 Thread Peter Zijlstra
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

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 09:38:45AM +0900, Byungchul Park wrote: > On Mon, Sep 04, 2017 at 01:42:48PM +0200, Peter Zijlstra wrote: > > On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > > > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > > > And get tangled up

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

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 09:38:45AM +0900, Byungchul Park wrote: > On Mon, Sep 04, 2017 at 01:42:48PM +0200, Peter Zijlstra wrote: > > On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > > > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > > > And get tangled up

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

2017-09-04 Thread Byungchul Park
On Mon, Sep 04, 2017 at 01:42:48PM +0200, Peter Zijlstra wrote: > On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > > And get tangled up with the workqueue annotation again, no thanks. > > > Having the first few

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

2017-09-04 Thread Byungchul Park
On Mon, Sep 04, 2017 at 01:42:48PM +0200, Peter Zijlstra wrote: > On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > > And get tangled up with the workqueue annotation again, no thanks. > > > Having the first few

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

2017-09-04 Thread Peter Zijlstra
On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > And get tangled up with the workqueue annotation again, no thanks. > > Having the first few works see the thread setup isn't worth it. > > > > And your work_id

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

2017-09-04 Thread Peter Zijlstra
On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > And get tangled up with the workqueue annotation again, no thanks. > > Having the first few works see the thread setup isn't worth it. > > > > And your work_id

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

2017-09-03 Thread Byungchul Park
On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > > > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra > > > wrote: > > > > On

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

2017-09-03 Thread Byungchul Park
On Mon, Sep 04, 2017 at 10:30:32AM +0900, Byungchul Park wrote: > On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > > > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra > > > wrote: > > > > On Fri, Sep 01, 2017 at

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

2017-09-03 Thread Byungchul Park
On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > > > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > > > > > >> It

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

2017-09-03 Thread Byungchul Park
On Fri, Sep 01, 2017 at 06:38:52PM +0200, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > > > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > > > > > >> It would be gone _only_ at

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > > > >> It would be gone _only_ at the time the history overrun, and then it > >> will

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 10:51:48PM +0900, Byungchul Park wrote: > On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > > > >> It would be gone _only_ at the time the history overrun, and then it > >> will be built again. So,

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

2017-09-01 Thread Byungchul Park
On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > >> It would be gone _only_ at the time the history overrun, and then it >> will be built again. So, you are wrong. s/it will be built again/the

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

2017-09-01 Thread Byungchul Park
On Fri, Sep 1, 2017 at 9:38 PM, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > >> It would be gone _only_ at the time the history overrun, and then it >> will be built again. So, you are wrong. s/it will be built again/the acquisition will be added into

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > It would be gone _only_ at the time the history overrun, and then it > will be built again. So, you are wrong. How will it ever be build again? You only ever spawn the worker thread _ONCE_, then it runs lots and lots of works. We

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 07:16:29PM +0900, Byungchul Park wrote: > It would be gone _only_ at the time the history overrun, and then it > will be built again. So, you are wrong. How will it ever be build again? You only ever spawn the worker thread _ONCE_, then it runs lots and lots of works. We

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

2017-09-01 Thread
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Fri, Sep 01, 2017 at 11:47:47AM +0200, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > > > On

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

2017-09-01 Thread
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Fri, Sep 01, 2017 at 11:47:47AM +0200, Peter Zijlstra wrote: > > On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > > > On

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

2017-09-01 Thread Byungchul Park
On Fri, Sep 01, 2017 at 11:47:47AM +0200, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > > On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > > > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > > > It's not important.

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

2017-09-01 Thread Byungchul Park
On Fri, Sep 01, 2017 at 11:47:47AM +0200, Peter Zijlstra wrote: > On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > > On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > > > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > > > It's not important.

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > > It's not important. Ok, check the following, instead: > > > > > > context X

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

2017-09-01 Thread Peter Zijlstra
On Fri, Sep 01, 2017 at 11:05:12AM +0900, Byungchul Park wrote: > On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > > It's not important. Ok, check the following, instead: > > > > > > context X

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

2017-08-31 Thread Byungchul Park
On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > It's not important. Ok, check the following, instead: > > > > context X context Y > > - - > >

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

2017-08-31 Thread Byungchul Park
On Thu, Aug 31, 2017 at 10:34:53AM +0200, Peter Zijlstra wrote: > On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > > It's not important. Ok, check the following, instead: > > > > context X context Y > > - - > >

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

2017-08-31 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > It's not important. Ok, check the following, instead: > > context X context Y > - - > wait_for_completion(C) > acquire(A) > release(A) > process_one_work() >

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

2017-08-31 Thread Peter Zijlstra
On Thu, Aug 31, 2017 at 05:15:01PM +0900, Byungchul Park wrote: > It's not important. Ok, check the following, instead: > > context X context Y > - - > wait_for_completion(C) > acquire(A) > release(A) > process_one_work() >

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

2017-08-31 Thread Byungchul Park
On Thu, Aug 31, 2017 at 10:04:42AM +0200, Peter Zijlstra wrote: > On Wed, Aug 30, 2017 at 08:25:46PM +0900, Byungchul Park wrote: > > > For example - I'm giving you the same example repeatedly: > > > > context X context Y > > - - > >

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

2017-08-31 Thread Byungchul Park
On Thu, Aug 31, 2017 at 10:04:42AM +0200, Peter Zijlstra wrote: > On Wed, Aug 30, 2017 at 08:25:46PM +0900, Byungchul Park wrote: > > > For example - I'm giving you the same example repeatedly: > > > > context X context Y > > - - > >

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

2017-08-31 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 06:24:39PM +0900, Byungchul Park wrote: > > And there obviously _should_ not be any dependencies between those. A > > 100% right. Since there obviously should not be any, it would be better > to check them. So I've endlessly asked you 'do you have any reason removing > the

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

2017-08-31 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 06:24:39PM +0900, Byungchul Park wrote: > > And there obviously _should_ not be any dependencies between those. A > > 100% right. Since there obviously should not be any, it would be better > to check them. So I've endlessly asked you 'do you have any reason removing > the

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

2017-08-31 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 08:25:46PM +0900, Byungchul Park wrote: > For example - I'm giving you the same example repeatedly: > > context X context Y > - - > wait_for_completion(C) > acquire(A) > process_one_work() >

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

2017-08-31 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 08:25:46PM +0900, Byungchul Park wrote: > For example - I'm giving you the same example repeatedly: > > context X context Y > - - > wait_for_completion(C) > acquire(A) > process_one_work() >

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

2017-08-31 Thread Byungchul Park
12 PM > > > To: Byungchul Park > > > Cc: mi...@kernel.org; t...@kernel.org; boqun.f...@gmail.com; > > > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- > > > ker...@vger.kernel.org; kernel-t...@lge.com > > > Subject: Re: [PATCH 4/4] lockd

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

2017-08-31 Thread Byungchul Park
12 PM > > > To: Byungchul Park > > > Cc: mi...@kernel.org; t...@kernel.org; boqun.f...@gmail.com; > > > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- > > > ker...@vger.kernel.org; kernel-t...@lge.com > > > Subject: Re: [PATCH 4/4] lockd

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

2017-08-30 Thread Byungchul Park
30, 2017 6:12 PM >> > To: Byungchul Park >> > Cc: mi...@kernel.org; t...@kernel.org; boqun.f...@gmail.com; >> > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- >> > ker...@vger.kernel.org; kernel-t...@lge.com >> > Subject: Re: [P

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

2017-08-30 Thread Byungchul Park
gt; > To: Byungchul Park >> > Cc: mi...@kernel.org; t...@kernel.org; boqun.f...@gmail.com; >> > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- >> > ker...@vger.kernel.org; kernel-t...@lge.com >> > Subject: Re: [PATCH 4/4] lockdep: Fix wor

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

2017-08-30 Thread Byungchul Park
; boqun.f...@gmail.com; > > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- > > ker...@vger.kernel.org; kernel-t...@lge.com > > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byu

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

2017-08-30 Thread Byungchul Park
; boqun.f...@gmail.com; > > da...@fromorbit.com; johan...@sipsolutions.net; o...@redhat.com; linux- > > ker...@vger.kernel.org; kernel-t...@lge.com > > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byu

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 11:12:23AM +0200, Peter Zijlstra wrote: > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > >

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 11:12:23AM +0200, Peter Zijlstra wrote: > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > >

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > My point is that we inevitably lose valuable dependencies by yours. > That's > &

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > My point is that we inevitably lose valuable dependencies by yours. > That's > &

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 11:12:23AM +0200, Peter Zijlstra wrote: > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > My point is that we inevitably lose valuable dependencies by yours. That's > > why I've endlessly asked you 'do you have any reason you try those patches?' > > a

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 11:12:23AM +0200, Peter Zijlstra wrote: > On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > > My point is that we inevitably lose valuable dependencies by yours. That's > > why I've endlessly asked you 'do you have any reason you try those patches?' > > a

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > My point is that we inevitably lose valuable dependencies by yours. That's > why I've endlessly asked you 'do you have any reason you try those patches?' > a ton of times. And you have never answered it. The only dependencies that

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 06:01:59PM +0900, Byungchul Park wrote: > My point is that we inevitably lose valuable dependencies by yours. That's > why I've endlessly asked you 'do you have any reason you try those patches?' > a ton of times. And you have never answered it. The only dependencies that

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 04:41:17PM +0900, Byungchul Park wrote: > > On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > > > &

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

2017-08-30 Thread Byungchul Park
.com; linux- > ker...@vger.kernel.org; kernel-t...@lge.com > Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation > > On Wed, Aug 30, 2017 at 04:41:17PM +0900, Byungchul Park wrote: > > On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > >

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 04:41:17PM +0900, Byungchul Park wrote: > On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > > > Signed-off-by: Peter Zijlstra (Intel) > > > --- > > > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > > > index

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

2017-08-30 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 04:41:17PM +0900, Byungchul Park wrote: > On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > > > Signed-off-by: Peter Zijlstra (Intel) > > > --- > > > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > > > index c0331891dec1..ab3c0dc8c7ed 100644 > > >

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

2017-08-30 Thread Byungchul Park
On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > On Tue, Aug 29, 2017 at 10:59:39AM +0200, Peter Zijlstra wrote: > > Subject: lockdep: Untangle xhlock history save/restore from task > > independence > > > > Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to > >

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

2017-08-30 Thread Byungchul Park
On Wed, Aug 30, 2017 at 11:09:53AM +0900, Byungchul Park wrote: > On Tue, Aug 29, 2017 at 10:59:39AM +0200, Peter Zijlstra wrote: > > Subject: lockdep: Untangle xhlock history save/restore from task > > independence > > > > Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to > >

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 10:59:39AM +0200, Peter Zijlstra wrote: > Subject: lockdep: Untangle xhlock history save/restore from task independence > > Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to > ensure the temporal IRQ events don't interact with task state, the >

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 10:59:39AM +0200, Peter Zijlstra wrote: > Subject: lockdep: Untangle xhlock history save/restore from task independence > > Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to > ensure the temporal IRQ events don't interact with task state, the >

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

2017-08-29 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 01:02:39AM +0900, Byungchul Park wrote: > On Tue, Aug 29, 2017 at 5:59 PM, Peter Zijlstra 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 > >>

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

2017-08-29 Thread Peter Zijlstra
On Wed, Aug 30, 2017 at 01:02:39AM +0900, Byungchul Park wrote: > On Tue, Aug 29, 2017 at 5:59 PM, Peter Zijlstra 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}(). > >

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 6:01 PM, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 03:46:38PM +0900, Byungchul Park wrote: > >> How does a maintainer choose a very work-around method and avoid >> problems rather than fix a root cause? I am very disappointed. > > Time.. we need

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 6:01 PM, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 03:46:38PM +0900, Byungchul Park wrote: > >> How does a maintainer choose a very work-around method and avoid >> problems rather than fix a root cause? I am very disappointed. > > Time.. we need this sorted before we

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 5:59 PM, Peter Zijlstra 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

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

2017-08-29 Thread Byungchul Park
On Tue, Aug 29, 2017 at 5:59 PM, Peter Zijlstra 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

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

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 03:46:38PM +0900, Byungchul Park wrote: > How does a maintainer choose a very work-around method and avoid > problems rather than fix a root cause? I am very disappointed. Time.. we need this sorted before we push the whole lot to Linus in the next window. Fixing the

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

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 03:46:38PM +0900, Byungchul Park wrote: > How does a maintainer choose a very work-around method and avoid > problems rather than fix a root cause? I am very disappointed. Time.. we need this sorted before we push the whole lot to Linus in the next window. Fixing the

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

2017-08-29 Thread Peter Zijlstra
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. You seem to still think it can be used like the soft/hard-irq ones, this is

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

2017-08-29 Thread Peter Zijlstra
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. You seem to still think it can be used like the soft/hard-irq ones, this is

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

2017-08-29 Thread Byungchul Park
On Wed, Aug 23, 2017 at 01:58:47PM +0200, Peter Zijlstra wrote: > The new completion/crossrelease annotations interact unfavourable with > the extant flush_work()/flush_workqueue() annotations. > > The problem is that when a single work class does: > > wait_for_completion() > > and > >

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

2017-08-29 Thread Byungchul Park
On Wed, Aug 23, 2017 at 01:58:47PM +0200, Peter Zijlstra wrote: > The new completion/crossrelease annotations interact unfavourable with > the extant flush_work()/flush_workqueue() annotations. > > The problem is that when a single work class does: > > wait_for_completion() > > and > >

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

2017-08-24 Thread Byungchul Park
On Thu, Aug 24, 2017 at 04:02:40PM +0200, Peter Zijlstra wrote: > > > + if (c == XHLOCK_PROC) { I found this now. Are you trying to invalidate it w/o checking force? No, we _should not_ do this. It's worse than work-around code. No reason to do this here. Please communicate with me more or

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

2017-08-24 Thread Byungchul Park
On Thu, Aug 24, 2017 at 04:02:40PM +0200, Peter Zijlstra wrote: > > > + if (c == XHLOCK_PROC) { I found this now. Are you trying to invalidate it w/o checking force? No, we _should not_ do this. It's worse than work-around code. No reason to do this here. Please communicate with me more or

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

2017-08-24 Thread Byungchul Park
On Thu, Aug 24, 2017 at 04:02:40PM +0200, Peter Zijlstra wrote: > On Thu, Aug 24, 2017 at 11:18:40AM +0900, Byungchul Park wrote: > > On Wed, Aug 23, 2017 at 01:58:47PM +0200, Peter Zijlstra wrote: > > > > Also, unconditinoally switching to recursive-read here would fail to > > > detect the

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

2017-08-24 Thread Byungchul Park
On Thu, Aug 24, 2017 at 04:02:40PM +0200, Peter Zijlstra wrote: > On Thu, Aug 24, 2017 at 11:18:40AM +0900, Byungchul Park wrote: > > On Wed, Aug 23, 2017 at 01:58:47PM +0200, Peter Zijlstra wrote: > > > > Also, unconditinoally switching to recursive-read here would fail to > > > detect the

  1   2   >