public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Ashok Raj <ashok.raj@intel.com>, Andi Kleen <ak@muc.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, discuss@x86-64.org,
	Rusty Russell <rusty@rustycorp.com.au>,
	Srivattsa Vaddagiri <vatsa@in.ibm.com>
Subject: Re: [patch 2/5] x86_64: CPU hotplug support.
Date: Thu, 2 Jun 2005 16:33:08 -0700	[thread overview]
Message-ID: <20050602163307.C16913@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0506021416490.3157@montezuma.fsmlabs.com>; from zwane@arm.linux.org.uk on Thu, Jun 02, 2005 at 02:19:55PM -0600

On Thu, Jun 02, 2005 at 02:19:55PM -0600, Zwane Mwaikambo wrote:
> On Thu, 2 Jun 2005, Ashok Raj wrote:
> 
> > @@ -445,8 +477,10 @@ void __cpuinit start_secondary(void)
> >  	/*
> >  	 * Allow the master to continue.
> >  	 */
> > +	lock_ipi_call_lock();
> >  	cpu_set(smp_processor_id(), cpu_online_map);
> >  	mb();
> > +	unlock_ipi_call_lock();
> 
> What's that? Is this another smp_call_function race workaround? I thought 
> there was an additional patch to avoid the broadcast.

The other patch avoids sending to offline cpu's, but we read cpu_online_map
and clear self bit in smp_call_function. If a cpu comes online, dont we 
want this cpu to take part in smp_call_function?

if we dont care about this new CPU participating, and if cpu_set() is atomic
(for all NR_CPUS) we dont need to hold call_lock, otherwise we need to hold
this as well.

> 
> > +#include <asm/nmi.h>
> > +/* We don't actually take CPU down, just spin without interrupts. */
> > +static inline void play_dead(void)
> > +{
> > +	idle_task_exit();
> > +	mb();
> > +	/* Ack it */
> > +	__get_cpu_var(cpu_state) = CPU_DEAD;
> > +
> > +	local_irq_disable();
> > +	while (1)
> > +		safe_halt();
> > +}
> 
> Might as well drop the local_irq_disable since safe_halt enables 
> interrupts.
> 

Will do. I think we could cleanup more of the cpu state before we do safe_halt.

But i think i need to look how much more state can be cleaned out. 

In Ia64, we have a clear SAL handoff state, and essentially the cpu is handed
off as OS got it back to BIOS land. Althoght that might be a hard goal 
i need to look at what states _must_ be cleaned out as next step.


-- 
Cheers,
Ashok Raj
- Open Source Technology Center

  reply	other threads:[~2005-06-02 23:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 12:57 [patch 0/5] x86_64 CPU hotplug patch series Ashok Raj
2005-06-02 12:57 ` [patch 1/5] x86_64: Change init sections for CPU hotplug support Ashok Raj
2005-06-02 20:14   ` Zwane Mwaikambo
2005-06-02 23:19     ` Ashok Raj
2005-06-02 12:57 ` [patch 2/5] x86_64: " Ashok Raj
2005-06-02 20:19   ` Zwane Mwaikambo
2005-06-02 23:33     ` Ashok Raj [this message]
2005-06-02 23:45       ` Zwane Mwaikambo
2005-06-03  0:08         ` Ashok Raj
2005-06-03  2:01       ` Shaohua Li
2005-06-03 14:25         ` Ashok Raj
2005-06-02 12:57 ` [patch 3/5] x86_64: CPU hotplug sibling map cleanup Ashok Raj
2005-06-02 12:57 ` [patch 4/5] x86_64: Dont use broadcast shortcut to make it cpu hotplug safe Ashok Raj
2005-06-02 12:58 ` [patch 5/5] x86_64: Provide ability to choose using shortcuts for IPI in flat mode Ashok Raj
2005-06-02 20:10   ` Zwane Mwaikambo
2005-06-02 23:15     ` Ashok Raj
2005-06-02 20:25 ` [patch 0/5] x86_64 CPU hotplug patch series Zwane Mwaikambo
2005-06-03 16:35   ` Andi Kleen
2005-06-03 17:15     ` Ashok Raj

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=20050602163307.C16913@unix-os.sc.intel.com \
    --to=ashok.raj@intel.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustycorp.com.au \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@arm.linux.org.uk \
    /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