Re: [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains()

From: Max Krasnyansky
Date: Mon Jun 30 2008 - 15:01:31 EST


Heiko Carstens wrote:
On Sun, Jun 29, 2008 at 08:51:32PM +0400, Oleg Nesterov wrote:
static void topology_work_fn(struct work_struct *work)
{
- /* We can't call arch_reinit_sched_domains() from a multi-threaded
- * workqueue context since it may deadlock in case of cpu hotplug.
- * So we have to create a kernel thread in order to call
- * arch_reinit_sched_domains().
- */
- kthread_run(topology_kthread, NULL, "topology_update");
+ arch_reinit_sched_domains();

Thank you! Tested and still works ;)

btw Ideally we should not be calling arch_reinit_sched_domains() here because it'll nuke all sched domains created by the cpuset. We should instead notify cpusets subsystem and let it rebuild sched domains. In order to do that we either have to make rebuild_sched_domains() callable from any context or change arch_init_sched_domains() to no destroy current domains. Paul M. sent some patches to address first option and I'm working on the second option.

Max


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/