All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] kernel-workqueuec-remove-noop-in-workqueue.patch removed from -mm tree
@ 2011-01-10 21:30 akpm
       [not found] ` <20110111143502.GD30607@htj.dyndns.org>
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2011-01-10 21:30 UTC (permalink / raw)
  To: dhillf, tj, mm-commits


The patch titled
     kernel/workqueue.c: remove noop in workqueue
has been removed from the -mm tree.  Its filename was
     kernel-workqueuec-remove-noop-in-workqueue.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: kernel/workqueue.c: remove noop in workqueue
From: Hillf Danton <dhillf@gmail.com>

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>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/workqueue.c |    1 -
 1 file changed, 1 deletion(-)

diff -puN kernel/workqueue.c~kernel-workqueuec-remove-noop-in-workqueue kernel/workqueue.c
--- a/kernel/workqueue.c~kernel-workqueuec-remove-noop-in-workqueue
+++ a/kernel/workqueue.c
@@ -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));
 }
 
_

Patches currently in -mm which might be from dhillf@gmail.com are

origin.patch
linux-next.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] workqueue: note the nested NOT_RUNNING test in worker_clr_flags() isn't a noop
       [not found] ` <20110111143502.GD30607@htj.dyndns.org>
@ 2011-01-11 15:04   ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2011-01-11 15:04 UTC (permalink / raw)
  To: akpm; +Cc: dhillf, mm-commits, linux-kernel

The nested NOT_RUNNING test in worker_clr_flags() is slightly
misleading in that if NOT_RUNNING were a single flag the nested test
would be always %true and thus noop.  Add a comment noting that the
test isn't a noop.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
Let's avoid similar mistakes in the future.  Thanks.

 kernel/workqueue.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 930c239..11869fa 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -768,7 +768,11 @@ static inline void worker_clr_flags(struct worker *worker, unsigned int flags)
 
 	worker->flags &= ~flags;
 
-	/* if transitioning out of NOT_RUNNING, increment nr_running */
+	/*
+	 * If transitioning out of NOT_RUNNING, increment nr_running.  Note
+	 * that the nested NOT_RUNNING is not a noop.  NOT_RUNNING is mask
+	 * of multiple flags, not a single flag.
+	 */
 	if ((flags & WORKER_NOT_RUNNING) && (oflags & WORKER_NOT_RUNNING))
 		if (!(worker->flags & WORKER_NOT_RUNNING))
 			atomic_inc(get_gcwq_nr_running(gcwq->cpu));
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-11 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 21:30 [merged] kernel-workqueuec-remove-noop-in-workqueue.patch removed from -mm tree akpm
     [not found] ` <20110111143502.GD30607@htj.dyndns.org>
2011-01-11 15:04   ` [PATCH] workqueue: note the nested NOT_RUNNING test in worker_clr_flags() isn't a noop Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.