linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Ebbert <cebbert@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: <PING> Re: [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time
Date: Sat, 4 Oct 2008 18:30:14 -0400	[thread overview]
Message-ID: <20081004183014.769836ff@redhat.com> (raw)
In-Reply-To: <87ljx4nw09.fsf_-_@basil.nowhere.org>

On Sat, 04 Oct 2008 18:52:06 +0200
Andi Kleen <andi@firstfloor.org> wrote:

> 
> Ping? Can you please test the patch?  I think that's the correct fix.
>  
> I see Ingo unfortunately merged your initial broken hack, but it's wrong
> and when actually used on a distribution will break real CPU hotplug there.
> Please don't enable that CONFIG option in Fedora. Ideally drop
> the CONFIG patch completely because it cannot do much good.
> 
> It should be replaced with the appended patch, which should go into 2.6.27
> after it is confirmed to fix the problem.
> 

Yes, it works and I don't see how it could cause any problems.

Ingo, can we get this in 2.6.27? You can drop my original patch.

Tested-by: Chuck Ebbert <cebbert@redhat.com>

> > ---
> >
> > Take disabled cpus into account in alternative.c
> >
> > Otherwise an UP system with one hotplug CPU will not 
> > go into UP mode.
> >
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> >
> > Index: linux-2.6.27-rc4-misc/arch/x86/kernel/alternative.c
> > ===================================================================
> > --- linux-2.6.27-rc4-misc.orig/arch/x86/kernel/alternative.c
> > +++ linux-2.6.27-rc4-misc/arch/x86/kernel/alternative.c
> > @@ -454,7 +454,7 @@ void __init alternative_instructions(voi
> >  					    _text, _etext);
> >  
> >  		/* Only switch to UP mode if we don't immediately boot others */
> > -		if (num_possible_cpus() == 1 || setup_max_cpus <= 1)
> > +		if (num_possible_cpus() - additional_cpus == 1 || setup_max_cpus <= 1)
> >  			alternatives_smp_switch(0);
> >  	}
> >  #endif
> > Index: linux-2.6.27-rc4-misc/arch/x86/kernel/smpboot.c
> > ===================================================================
> > --- linux-2.6.27-rc4-misc.orig/arch/x86/kernel/smpboot.c
> > +++ linux-2.6.27-rc4-misc/arch/x86/kernel/smpboot.c
> > @@ -1276,7 +1276,7 @@ static void remove_siblinginfo(int cpu)
> >  	cpu_clear(cpu, cpu_sibling_setup_map);
> >  }
> >  
> > -static int additional_cpus __initdata = -1;
> > +int additional_cpus = -1;
> >  
> >  static __init int setup_additional_cpus(char *s)
> >  {
> > Index: linux-2.6.27-rc4-misc/include/asm-x86/smp.h
> > ===================================================================
> > --- linux-2.6.27-rc4-misc.orig/include/asm-x86/smp.h
> > +++ linux-2.6.27-rc4-misc/include/asm-x86/smp.h
> > @@ -204,5 +204,7 @@ static inline int hard_smp_processor_id(
> >  extern void cpu_uninit(void);
> >  #endif
> >  
> > +extern int additional_cpus;
> > +
> >  #endif /* __ASSEMBLY__ */
> >  #endif
> > -- 
> > ak@linux.intel.com
> 

  reply	other threads:[~2008-10-04 22:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 23:19 [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time Chuck Ebbert
2008-10-02  8:12 ` Ingo Molnar
2008-10-02 19:30   ` [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time, V2 Chuck Ebbert
2008-10-02 19:42     ` Ingo Molnar
2008-10-02 19:48       ` H. Peter Anvin
2008-10-02 19:50         ` Ingo Molnar
2008-10-02  9:12 ` [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time Andi Kleen
2008-10-02 19:25   ` Chuck Ebbert
2008-10-02 19:44     ` Andi Kleen
2008-10-02 20:09       ` Chuck Ebbert
2008-10-02 20:40         ` Andi Kleen
2008-10-04 16:52           ` <PING> " Andi Kleen
2008-10-04 22:30             ` Chuck Ebbert [this message]
2008-10-05 10:28               ` Ingo Molnar
2008-10-05 14:52                 ` Thomas Gleixner
2008-10-05 15:20                   ` Ingo Molnar
2008-10-05 15:51                     ` Thomas Gleixner
2008-10-05 15:56                       ` Ingo Molnar
2008-10-05 20:39                       ` Andi Kleen
2008-10-05 21:49                         ` Thomas Gleixner
2008-10-05 22:45                           ` Andi Kleen
2008-10-05 20:28                     ` Andi Kleen
     [not found] <bijiX-86S-5@gated-at.bofh.it>
     [not found] ` <bisvP-3es-3@gated-at.bofh.it>
     [not found]   ` <biC2k-7cR-17@gated-at.bofh.it>
     [not found]     ` <biCbU-7lA-15@gated-at.bofh.it>
     [not found]       ` <biCOy-8ep-3@gated-at.bofh.it>
     [not found]         ` <biD7T-5N-1@gated-at.bofh.it>
     [not found]           ` <bjiEh-2MC-21@gated-at.bofh.it>
     [not found]             ` <bjnXc-1ec-11@gated-at.bofh.it>
     [not found]               ` <bjz2s-78A-13@gated-at.bofh.it>
     [not found]                 ` <bjDfK-40E-19@gated-at.bofh.it>
     [not found]                   ` <bjDIN-4L8-31@gated-at.bofh.it>
     [not found]                     ` <bjEbU-5eX-19@gated-at.bofh.it>
     [not found]                       ` <bjIIi-2Oi-1@gated-at.bofh.it>
     [not found]                         ` <bjJOk-49Q-5@gated-at.bofh.it>
     [not found]                           ` <bjKAv-5bK-17@gated-at.bofh.it>
2008-10-06 10:59                             ` Bodo Eggert
2008-10-06 13:22                               ` Andi Kleen

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=20081004183014.769836ff@redhat.com \
    --to=cebbert@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).