[PATCH wq#for-linus] workqueue: workqueue_cpu_callback() should be cpu_notifier not hotcpu_notifier

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Monday, August 9, 2010 - 2:36 am

Commit 6ee0578b (workqueue: mark init_workqueues as early_initcall)
made workqueue SMP initialization depend on workqueue_cpu_callback(),
which however was registered as hotcpu_notifier() and didn't get
called if CONFIG_HOTPLUG_CPU is not set.  This made gcwqs on non-boot
CPUs not create their initial workers leading to boot failures.  Fix
it by making it a cpu_notifier.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-bisected-by: walt <w41ter@gmail.com>
---
So, something like this.  Can you please verify the fix?

Thanks.

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

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index da6c482..2994a0e 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3527,7 +3527,7 @@ static int __init init_workqueues(void)
 	unsigned int cpu;
 	int i;

-	hotcpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE);
+	cpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE);

 	/* initialize gcwqs */
 	for_each_gcwq_cpu(cpu) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [BISECTED] Today's Linus.git hangs during boot: can't ..., Markus Trippelsdorf, (Sun Aug 8, 11:37 pm)
[PATCH wq#for-linus] workqueue: workqueue_cpu_callback() s ..., Tejun Heo, (Mon Aug 9, 2:36 am)
Re: [PATCH wq#for-linus] workqueue: workqueue_cpu_callback ..., Markus Trippelsdorf, (Mon Aug 9, 2:46 am)
Re: [PATCH wq#for-linus] workqueue: workqueue_cpu_callback ..., Markus Trippelsdorf, (Mon Aug 9, 2:56 am)
Re: [PATCH wq#for-linus] drm: fix a fallout from slow-work ..., Markus Trippelsdorf, (Mon Aug 9, 3:14 am)