Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932202AbYF3Npt (ORCPT ); Mon, 30 Jun 2008 09:45:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756610AbYF3Npl (ORCPT ); Mon, 30 Jun 2008 09:45:41 -0400 Received: from mtagate8.de.ibm.com ([195.212.29.157]:4432 "EHLO mtagate8.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755758AbYF3Npk (ORCPT ); Mon, 30 Jun 2008 09:45:40 -0400 Date: Mon, 30 Jun 2008 15:45:37 +0200 From: Heiko Carstens To: Oleg Nesterov Cc: Andrew Morton , Gautham R Shenoy , Max Krasnyansky , Paul Jackson , Paul Menage , Peter Zijlstra , Vegard Nossum , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains() Message-ID: <20080630134537.GC7686@osiris.boeblingen.de.ibm.com> References: <20080629165132.GA11218@tv-sign.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080629165132.GA11218@tv-sign.ru> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1695 Lines: 50 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 > > --- 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 > #include > #include > -#include > #include > #include > #include > @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/