S390 topology: don't use kthread() for arch_reinit_sched_domains()
Now that it is safe to use get_online_cpus() we can revert
[S390] cpu topology: Fix possible deadlock.
commit: fd781fa25c
and call arch_reinit_sched_domains() directly from topology_work_fn().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Paul Menage <menage@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3da1c84c00
commit
69b895fd13
@ -9,7 +9,6 @@
|
|||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/kthread.h>
|
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/smp.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)
|
static void topology_work_fn(struct work_struct *work)
|
||||||
{
|
{
|
||||||
/* We can't call arch_reinit_sched_domains() from a multi-threaded
|
arch_reinit_sched_domains();
|
||||||
* 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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void topology_schedule_update(void)
|
void topology_schedule_update(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user