Re: [PATCH] workqueue: cond_resched() after processing each work item

2013-08-28 Thread Jamie Liu
Hi Tejun, On Wed, Aug 28, 2013 at 2:33 PM, Tejun Heo wrote: > Would something like the following work? Can you please verify it? I confirm that this works. > Thanks. > 8< > If !PREEMPT, a kworker running work items back to back can hog CPU. > This becomes dangerous when a self-requeu

[PATCH] workqueue: cond_resched() after processing each work item

2013-08-28 Thread Tejun Heo
Would something like the following work? Can you please verify it? Thanks. 8< If !PREEMPT, a kworker running work items back to back can hog CPU. This becomes dangerous when a self-requeueing work item which is waiting for something to happen races against stop_machine. Such self-reque