workqueue: Add quiescent state between work items
authorJoe Lawrence <joe.lawrence@stratus.com>
Sun, 5 Oct 2014 17:24:21 +0000 (13:24 -0400)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 6 Oct 2014 12:57:43 +0000 (05:57 -0700)
commit789cbbeca4eb7141cbd748ee93772471101b507b
tree357a38595c99840947212b6ec89a7a6d4ada2aee
parentc98fed9fc6a7449affd941d8a8e9fcb0c72977d6
workqueue: Add quiescent state between work items

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 there are other higher priority tasks to run, so force a
quiescent RCU state between work items.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Link: https://lkml.kernel.org/r/20140926105227.01325697@jlaw-desktop.mno.stratus.com
Link: https://lkml.kernel.org/r/20140929115445.40221d8e@jlaw-desktop.mno.stratus.com
Fixes: b22ce2785d97 ("workqueue: cond_resched() after processing each work item")
Cc: <stable@vger.kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/workqueue.c