[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 09 of 10] arm: SMP CPU shutdown



At 10:38 +0000 on 28 Feb (1330425518), Ian Campbell wrote:
> On Thu, 2012-02-23 at 17:40 +0000, Tim Deegan wrote:
> > # HG changeset patch
> > # User Tim Deegan <tim@xxxxxxx>
> > # Date 1330018799 0
> > # Node ID a78bc9b8421492e0545c6d52c7a32b9de9737d61
> > # Parent  d35b52e5fde829dfbaf3da73e0716d004faded2f
> > arm: SMP CPU shutdown
> > 
> > For completeness, also implelent the CPU shutdown path.
> 
> Does something free the init_stack for a CPU as it goes down?

Er, no. :)  

> Alternatively the bring up path could reuse it if the CPU came back but
> we don't seem to do that either.

I'll make it so. 

> > Signed-off-by: TIm Deegan <tim@xxxxxxx>
> 
> Typo here.

WHat TYpo? I ALways SIgn MY NAme THat WAy.

> [...]
> > +    /* It's now safe to remove this processor from the online map */
> > +    cpumask_clear_cpu(cpu, &cpu_online_map);
> > +
> > +    if ( cpu_disable_scheduler(cpu) )
> > +        BUG();
> > +    mb();
> > +
> > +    /* Return to caller; eventually the IPI mecahnism will unwind and the 
> 
>                                                mechanism

ta.

> > +     * scheduler will drop to the idle loop, which will call stop_cpu(). */
> > +}
> > +
> > +void stop_cpu(void)
> > +{
> > +    local_irq_disable();
> > +    cpu_is_dead = 1;
> 
> Do we lock this variable? What stops multiple CPUs coming down at once?

IIRC that's serialized at a higher level, and the x86 equivalent
similarly uses static variables for signalling.  Will double-check
before I re-send this series (probably next week).

Cheers,

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.