This is a note to let you know that I've just added the patch titled

    workqueue: wake up a worker when a rescuer is leaving a gcwq

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     workqueue-wake-up-a-worker-when-a-rescuer-is-leaving-a-gcwq.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 7576958a9d5a4a677ad7dd40901cdbb6c1110c98 Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Mon, 14 Feb 2011 14:04:46 +0100
Subject: workqueue: wake up a worker when a rescuer is leaving a gcwq

From: Tejun Heo <[email protected]>

commit 7576958a9d5a4a677ad7dd40901cdbb6c1110c98 upstream.

After executing the matching works, a rescuer leaves the gcwq whether
there are more pending works or not.  This may decrease the
concurrency level to zero and stall execution until a new work item is
queued on the gcwq.

Make rescuer wake up a regular worker when it leaves a gcwq if there
are more works to execute, so that execution isn't stalled.

Signed-off-by: Tejun Heo <[email protected]>
Reported-by: Ray Jui <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/workqueue.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2009,6 +2009,15 @@ repeat:
                                move_linked_works(work, scheduled, &n);
 
                process_scheduled_works(rescuer);
+
+               /*
+                * Leave this gcwq.  If keep_working() is %true, notify a
+                * regular worker; otherwise, we end up with 0 concurrency
+                * and stalling the execution.
+                */
+               if (keep_working(gcwq))
+                       wake_up_worker(gcwq);
+
                spin_unlock_irq(&gcwq->lock);
        }
 


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/workqueue-wake-up-a-worker-when-a-rescuer-is-leaving-a-gcwq.patch
queue-2.6.37/workqueue-make-sure-mayday_initial_timeout-is-at-least-2-jiffies-long.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to