From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848AbYIACGw (ORCPT ); Sun, 31 Aug 2008 22:06:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752054AbYIACGn (ORCPT ); Sun, 31 Aug 2008 22:06:43 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:58400 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbYIACGm (ORCPT ); Sun, 31 Aug 2008 22:06:42 -0400 Date: Sun, 31 Aug 2008 19:06:40 -0700 From: "Paul E. McKenney" To: Benjamin Herrenschmidt Cc: linux-kernel@vger.kernel.org, paulus@samba.org, jwboyer@linux.vnet.ibm.com, tnt@246tNt.com, grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org, manfred@colorfullife.com, akpm@linux-foundation.org Subject: Re: [PATCH] prevent powerpc from invoking irq handlers on offline CPUs Message-ID: <20080901020640.GM7015@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20080831173127.GA15296@linux.vnet.ibm.com> <1220229284.13162.411.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220229284.13162.411.camel@pasglop> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 01, 2008 at 10:34:44AM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2008-08-31 at 10:31 -0700, Paul E. McKenney wrote: > > Make powerpc refrain from clearing a given to-be-offlined CPU's bit in the > > cpu_online_mask until it has processed pending irqs. This change > > prevents other CPUs from being blindsided by an apparently offline CPU > > nevertheless changing globally visible state. > > > > Signed-off-by: Paul E. McKenney > > --- > > Sounds reasonable... the only possible worry here is if somebody tries > an IPI ... The IPI code will and the target CPU mask with the online > map, so it may try to send to the to-be-offlined CPU and timeout, no ? OK. Do we need separate IPI and online masks? Thanx, Paul > Cheers, > Ben. > > > smp.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > > index 5337ca7..1fedd7d 100644 > > --- a/arch/powerpc/kernel/smp.c > > +++ b/arch/powerpc/kernel/smp.c > > @@ -250,11 +250,11 @@ int generic_cpu_disable(void) > > if (cpu == boot_cpuid) > > return -EBUSY; > > > > - cpu_clear(cpu, cpu_online_map); > > #ifdef CONFIG_PPC64 > > vdso_data->processorCount--; > > fixup_irqs(cpu_online_map); > > #endif > > + cpu_clear(cpu, cpu_online_map); > > return 0; > > } > > >