The patch titled S390 topology: don't use kthread() for arch_reinit_sched_domains() has been added to the -mm tree. Its filename is s390-topology-dont-use-kthread-for-arch_reinit_sched_domains.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: S390 topology: don't use kthread() for arch_reinit_sched_domains() From: Oleg Nesterov <oleg@xxxxxxxxxx> 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@xxxxxxxxxx> Cc: Gautham R Shenoy <ego@xxxxxxxxxx> Tested-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Max Krasnyansky <maxk@xxxxxxxxxxxx> Cc: Paul Jackson <pj@xxxxxxx> Cc: Paul Menage <menage@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Vegard Nossum <vegard.nossum@xxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/s390/kernel/topology.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff -puN arch/s390/kernel/topology.c~s390-topology-dont-use-kthread-for-arch_reinit_sched_domains arch/s390/kernel/topology.c --- a/arch/s390/kernel/topology.c~s390-topology-dont-use-kthread-for-arch_reinit_sched_domains +++ a/arch/s390/kernel/topology.c @@ -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) _ Patches currently in -mm which might be from oleg@xxxxxxxxxx are get_user_pages-fix-possible-page-leak-on-oom.patch migrate_timers-add-comment-use-spinlock_irq.patch posix-timers-timer_delete-remove-the-bogus-it_process-=-null-check.patch posix-timers-release_posix_timer-kill-the-bogus-put_task_struct-it_process.patch signals-collect_signal-remove-the-unneeded-sigismember-check.patch signals-collect_signal-simplify-the-still_pending-logic.patch signals-change-collect_signal-to-return-void.patch __exit_signal-dont-take-rcu-lock.patch signals-dequeue_signal-dont-check-signal_group_exit-when-setting-signal_stop_dequeued.patch signals-do_signal_stop-kill-the-signal_unkillable-check.patch coredump-zap_threads-comments-use-while_each_thread.patch signals-make-siginfo_t-si_utime-si_sstime-report-times-in-user_hz-not-hz.patch kernel-signalc-change-vars-pid-and-tgid-types-to-pid_t.patch include-asm-ptraceh-userspace-headers-cleanup.patch ptrace-give-more-respect-to-sigkill.patch ptrace-never-sleep-in-task_traced-if-sigkilled.patch ptrace-kill-may_ptrace_stop.patch introduce-pf_kthread-flag.patch kill-pf_borrowed_mm-in-favour-of-pf_kthread.patch coredump-zap_threads-must-skip-kernel-threads.patch coredump-elf_core_dump-skip-kernel-threads.patch workqueues-insert_work-use-list_head-instead-of-int-tail.patch workqueues-implement-flush_work.patch workqueues-schedule_on_each_cpu-use-flush_work.patch workqueues-make-get_online_cpus-useable-for-work-func.patch s390-topology-dont-use-kthread-for-arch_reinit_sched_domains.patch pidns-remove-now-unused-kill_proc-function.patch pidns-remove-now-unused-find_pid-function.patch pidns-remove-find_task_by_pid-unused-for-a-long-time.patch distinct-tgid-tid-i-o-statistics.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html