public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains()
@ 2008-06-29 16:51 Oleg Nesterov
  2008-06-30 13:45 ` Heiko Carstens
  0 siblings, 1 reply; 7+ messages in thread
From: Oleg Nesterov @ 2008-06-29 16:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Gautham R Shenoy, Heiko Carstens, Max Krasnyansky, Paul Jackson,
	Paul Menage, Peter Zijlstra, Vegard Nossum, linux-kernel

Untested, needs Heiko's ack.

Now that it is safe to use get_online_cpus() we can revert

	[S390] cpu topology: Fix possible deadlock.
	commit: fd781fa25c9e9c6fd1599df060b05e7c4ad724e5

and call arch_reinit_sched_domains() directly from topology_work_fn().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 26-rc2/arch/s390/kernel/topology.c~WQ_5_TOPOLOGY	2008-05-18 15:43:28.000000000 +0400
+++ 26-rc2/arch/s390/kernel/topology.c	2008-06-29 20:42:38.000000000 +0400
@@ -9,7 +9,6 @@
 #include <linux/device.h>
 #include <linux/bootmem.h>
 #include <linux/sched.h>
-#include <linux/kthread.h>
 #include <linux/workqueue.h>
 #include <linux/cpu.h>
 #include <linux/smp.h>
@@ -230,20 +229,9 @@ void arch_update_cpu_topology(void)
 	}
 }
 
-static int topology_kthread(void *data)
-{
-	arch_reinit_sched_domains();
-	return 0;
-}
-
 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();
 }
 
 void topology_schedule_update(void)


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

end of thread, other threads:[~2008-06-30 20:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-29 16:51 [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains() Oleg Nesterov
2008-06-30 13:45 ` Heiko Carstens
2008-06-30 19:01   ` Max Krasnyansky
2008-06-30 19:33     ` Paul Jackson
2008-06-30 19:49       ` Max Krasnyansky
2008-06-30 20:28         ` Paul Jackson
2008-06-30 20:47           ` Max Krasnyansky

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