Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-08 Thread Paul E. McKenney
On Wed, Oct 08, 2014 at 01:54:28PM +0200, Jiri Pirko wrote: > Wed, Oct 08, 2014 at 05:24:11AM CEST, paul...@linux.vnet.ibm.com wrote: > >On Tue, Oct 07, 2014 at 01:45:28PM -0400, Joe Lawrence wrote: > >> On Tue, 7 Oct 2014 06:43:29 -0700 > >> "Paul E. McKenney" wrote: > >> > >> > On Tue, Oct 07,

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-08 Thread Jiri Pirko
Wed, Oct 08, 2014 at 05:24:11AM CEST, paul...@linux.vnet.ibm.com wrote: >On Tue, Oct 07, 2014 at 01:45:28PM -0400, Joe Lawrence wrote: >> On Tue, 7 Oct 2014 06:43:29 -0700 >> "Paul E. McKenney" wrote: >> >> > On Tue, Oct 07, 2014 at 09:29:42AM +0200, Jiri Pirko wrote: >> [ ... snip ... ] >> > >

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-07 Thread Paul E. McKenney
On Tue, Oct 07, 2014 at 01:45:28PM -0400, Joe Lawrence wrote: > On Tue, 7 Oct 2014 06:43:29 -0700 > "Paul E. McKenney" wrote: > > > On Tue, Oct 07, 2014 at 09:29:42AM +0200, Jiri Pirko wrote: > [ ... snip ... ] > > > > > > Paul, Tehun, how do you propose to fix this on older kernels which do > >

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-07 Thread Joe Lawrence
On Tue, 7 Oct 2014 06:43:29 -0700 "Paul E. McKenney" wrote: > On Tue, Oct 07, 2014 at 09:29:42AM +0200, Jiri Pirko wrote: [ ... snip ... ] > > > > Paul, Tehun, how do you propose to fix this on older kernels which do > > not have rcu_note_voluntary_context_switch? I'm particullary interested > >

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-07 Thread Paul E. McKenney
On Tue, Oct 07, 2014 at 09:29:42AM +0200, Jiri Pirko wrote: > Mon, Oct 06, 2014 at 06:21:58AM CEST, paul...@linux.vnet.ibm.com wrote: > >On Sun, Oct 05, 2014 at 03:47:48PM -0400, Tejun Heo wrote: > >> On Sun, Oct 05, 2014 at 03:21:19PM -0400, Tejun Heo wrote: > >> > On Sun, Oct 05, 2014 at 01:24:21

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-07 Thread Jiri Pirko
Mon, Oct 06, 2014 at 06:21:58AM CEST, paul...@linux.vnet.ibm.com wrote: >On Sun, Oct 05, 2014 at 03:47:48PM -0400, Tejun Heo wrote: >> On Sun, Oct 05, 2014 at 03:21:19PM -0400, Tejun Heo wrote: >> > On Sun, Oct 05, 2014 at 01:24:21PM -0400, Joe Lawrence wrote: >> > > Similar to the stop_machine dea

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-05 Thread Paul E. McKenney
On Sun, Oct 05, 2014 at 03:47:48PM -0400, Tejun Heo wrote: > On Sun, Oct 05, 2014 at 03:21:19PM -0400, Tejun Heo wrote: > > On Sun, Oct 05, 2014 at 01:24:21PM -0400, Joe Lawrence wrote: > > > Similar to the stop_machine deadlock scenario on !PREEMPT kernels > > > addressed in b22ce2785d97 "workqueu

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-05 Thread Tejun Heo
On Sun, Oct 05, 2014 at 03:21:19PM -0400, Tejun Heo wrote: > On Sun, Oct 05, 2014 at 01:24:21PM -0400, Joe Lawrence wrote: > > Similar to the stop_machine deadlock scenario on !PREEMPT kernels > > addressed in b22ce2785d97 "workqueue: cond_resched() after processing > > each work item", kworker thr

Re: [PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-05 Thread Tejun Heo
On Sun, Oct 05, 2014 at 01:24:21PM -0400, Joe Lawrence wrote: > Similar to the stop_machine deadlock scenario on !PREEMPT kernels > addressed in b22ce2785d97 "workqueue: cond_resched() after processing > each work item", kworker threads requeueing back-to-back with zero jiffy > delay can stall RCU.

[PATCH v2 1/2] workqueue: add quiescent state between work items

2014-10-05 Thread Joe Lawrence
Similar to the stop_machine deadlock scenario on !PREEMPT kernels addressed in b22ce2785d97 "workqueue: cond_resched() after processing each work item", kworker threads requeueing back-to-back with zero jiffy delay can stall RCU. The cond_resched call introduced in that fix will yield only iff ther