[PATCH] remove noop in workqueue

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hillf Danton
Date: Friday, December 17, 2010 - 5:56 am

Checking WORKER_NOT_RUNNING in the flags word of worker is unnecessary
if it is set in the flags parameter.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/kernel/workqueue.c	2010-11-01 19:54:12.000000000 +0800
+++ b/kernel/workqueue.c	2010-12-17 20:57:00.000000000 +0800
@@ -770,7 +770,6 @@ static inline void worker_clr_flags(stru

 	/* if transitioning out of NOT_RUNNING, increment nr_running */
 	if ((flags & WORKER_NOT_RUNNING) && (oflags & WORKER_NOT_RUNNING))
-		if (!(worker->flags & WORKER_NOT_RUNNING))
 			atomic_inc(get_gcwq_nr_running(gcwq->cpu));
 }
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] remove noop in workqueue, Hillf Danton, (Fri Dec 17, 5:56 am)