public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* CPU Hotplug broken -mm5 onwards
@ 2004-04-18 17:06 Srivatsa Vaddagiri
  2004-04-19  3:34 ` Nick Piggin
       [not found] ` <20040421023650.24b9f85a.akpm@osdl.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Srivatsa Vaddagiri @ 2004-04-18 17:06 UTC (permalink / raw)
  To: rusty, Ingo Molnar, Nick Piggin; +Cc: akpm, linux-kernel, lhcs-devel

Hi,
	I found that I can't boot with CONFIG_HOTPLUG_CPU defined in both
mm5 and mm6. Debugging this revealed it to be because exec path can now require 
cpu hotplug sem (sched_migrate_task) and this has lead to a deadlock between 
flush_workqueue and __call_usermodehelper. 

flush_workqueue takes cpu hotplug sem and blocks until workqueue is flushed.
__call_usermodehelper, one of the queued work function, blocks because it
also needs cpu hotplug sem during exec.  As of result of this, exec does not 
progress and system does not boot.

I feel we can fix this by converting cpucontrol to a reader-writer semaphore or 
big-reader-lock(?). One problem with reader-writer semaphore is there does not
seem to be any down_write_interruptible, which is needed by cpu_down/up.

Comments?

BTW, I think a cpu_is_offline check is needed in sched_migrate_task, since
dest_cpu could have been downed by the time it has acquired the semaphore. 
In which case, we could end up adding the task to dead cpu's runqueue?
An alternate solution would be to put the same check in __migrate_task.



-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017

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

end of thread, other threads:[~2004-04-22  7:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-18 17:06 CPU Hotplug broken -mm5 onwards Srivatsa Vaddagiri
2004-04-19  3:34 ` Nick Piggin
2004-04-19 12:58   ` [lhcs-devel] " Srivatsa Vaddagiri
2004-04-19 22:55     ` Nick Piggin
2004-04-19 23:07       ` Rusty Russell
     [not found] ` <20040421023650.24b9f85a.akpm@osdl.org>
     [not found]   ` <20040421095939.GB10767@in.ibm.com>
2004-04-21 16:44     ` Srivatsa Vaddagiri
2004-04-22  7:03       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox