[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 05/27] xen, cpu hotplug: Don't call cpu_bringup() in xen_play_dead()
- To: "Srivatsa S. Bhat" <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Tue, 5 Jun 2012 19:40:42 +0200 (CEST)
- Cc: linux-arch@xxxxxxxxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxxx>, nikunj@xxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, peterz@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, vatsa@xxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, rjw@xxxxxxx, yong.zhang0@xxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, paulmck@xxxxxxxxxxxxxxxxxx, mingo@xxxxxxxxxx
- Delivery-date: Wed, 06 Jun 2012 10:20:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Sat, 2 Jun 2012, Srivatsa S. Bhat wrote:
> Ok.. So, I would love to hear a confirmation about whether this patch (which
> removes cpu_bringup() in xen_play_dead()) will break things or it is good as
> If its not correct, then we can probably make __cpu_post_online() return an
> with the meaning:
> 0 => success, go ahead and call cpu_idle()
> non-zero => stop here, thanks for your services so far.. now leave the rest
> to me.
> So all other archs will return 0, Xen will return non-zero, and it will handle
> when to call cpu_idle() and when not to do so.
> Might sound a bit ugly, but I don't see much other option. Suggestions are
Yes, it's butt ugly.
You are tripping over the main misconception of the current hotplug
code: It's asymetric.
So people added warts and workarounds like the xen one. What you are
proposing is another wart and workaround.
The real way to avoid it, is to have the symetric state machine in
place first and then convert everything to that instead of introducing
an intermediate state which resembles the existing state.
One of the main things we need to do to make it symetric is to kill
the play_dead() thing in the idle loop and make idle a function which
returns on cpu_should_die().
Give me a day or two and I get you a working version of that. (Up is
functional, just down refuses to play along)
Xen-devel mailing list