linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: tnt@246tNt.com, manfred@colorfullife.com,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	paulus@samba.org, akpm@linux-foundation.org
Subject: Re: [PATCH] prevent powerpc from invoking irq handlers on offline CPUs
Date: Sun, 31 Aug 2008 19:06:40 -0700	[thread overview]
Message-ID: <20080901020640.GM7015@linux.vnet.ibm.com> (raw)
In-Reply-To: <1220229284.13162.411.camel@pasglop>

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 <paulmck@linux.vnet.ibm.com>
> > ---
> 
> 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;
> >  }
> >  
> 

  reply	other threads:[~2008-09-01  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-31 17:31 [PATCH] prevent powerpc from invoking irq handlers on offline CPUs Paul E. McKenney
2008-09-01  0:34 ` Benjamin Herrenschmidt
2008-09-01  2:06   ` Paul E. McKenney [this message]
2008-09-01  3:14     ` Benjamin Herrenschmidt
2008-09-01  5:00       ` Paul E. McKenney

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=20080901020640.GM7015@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=manfred@colorfullife.com \
    --cc=paulus@samba.org \
    --cc=tnt@246tNt.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;
as well as URLs for NNTP newsgroup(s).