From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Gautham R Shenoy <ego@in.ibm.com>,
Max Krasnyansky <maxk@qualcomm.com>, Paul Jackson <pj@sgi.com>,
Paul Menage <menage@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Vegard Nossum <vegard.nossum@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains()
Date: Mon, 30 Jun 2008 15:45:37 +0200 [thread overview]
Message-ID: <20080630134537.GC7686@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20080629165132.GA11218@tv-sign.ru>
On Sun, Jun 29, 2008 at 08:51:32PM +0400, Oleg Nesterov wrote:
> 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();
Thank you! Tested and still works ;)
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
next prev parent reply other threads:[~2008-06-30 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-29 16:51 Oleg Nesterov
2008-06-30 13:45 ` Heiko Carstens [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080630134537.GC7686@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=menage@google.com \
--cc=oleg@tv-sign.ru \
--cc=peterz@infradead.org \
--cc=pj@sgi.com \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome