lkml.org 
[lkml]   [2013]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] workqueue: defer to waiting stop_machine
On Wed, Aug 28, 2013 at 02:07:12PM -0700, Jamie Liu wrote:
...
> @@ -734,7 +735,8 @@ static bool may_start_working(struct worker_pool *pool)
> static bool keep_working(struct worker_pool *pool)
> {
> return !list_empty(&pool->worklist) &&
> - atomic_read(&pool->nr_running) <= 1;
> + atomic_read(&pool->nr_running) <= 1 &&
> + likely(!stop_machine_pending());

Isn't the problem that the kworker wouldn't yield to the higher
priority stopper task while a work item keeps requeueing itself if
preemption is not enabled? If so, isn't the correct solution just
adding cond_resched() in the work item processing loop? The analysis
and solution seem to have gone a bit stray....

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-08-28 23:41    [W:2.157 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site