Skip to contentSkip to conversation

workqueue changes for v3.8

GIT PULL Tejun Heo 1 participant 1 message Dec 11, 2012 Workqueue

lore
Share & tools
lore

Tejun Heo

author maintainer
#0 lore raw

Hello, Linus.

Please pull from the following branch to receive workqueue changes for v3.8. Nothing exciting. Just two trivial changes.

git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-3.8

Thanks.

----------------------------------------------------------------
Joonsoo Kim (2):
workqueue: trivial fix for return statement in work_busy()
workqueue: add WARN_ON_ONCE() on CPU number to wq_worker_waking_up()

 kernel/workqueue.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
kernel/workqueue.c +4 -2
index 084aa47..ae9a056 100644
@@ -739,8 +739,10 @@ void wq_worker_waking_up(struct task_struct *task, unsigned int cpu)
 {
 	struct worker *worker = kthread_data(task);
 
-	if (!(worker->flags & WORKER_NOT_RUNNING))
+	if (!(worker->flags & WORKER_NOT_RUNNING)) {
+		WARN_ON_ONCE(worker->pool->gcwq->cpu != cpu);
 		atomic_inc(get_pool_nr_running(worker->pool));
+	}
 }
 
 /**
@@ -3485,7 +3487,7 @@ unsigned int work_busy(struct work_struct *work)
 	unsigned int ret = 0;
 
 	if (!gcwq)
-		return false;
+		return 0;
 
 	spin_lock_irqsave(&gcwq->lock, flags);