Re: CPU hotplug: system hang on CPU hot remove during `pfmon--system-wide'

From: Rusty Russell
Date: Tue May 29 2007 - 22:42:35 EST


On Tue, 2007-05-29 at 13:56 -0700, Linus Torvalds wrote:
>
> On Mon, 28 May 2007, Srivatsa Vaddagiri wrote:
> >
> > So is it settled now on what approach we are going to follow (freezer
> > vs lock based) for cpu hotplug? I thought that Linus was not favouring freezer
> > based approach sometime back ..
>
> As far as I'm concerned, we should
> - use "preempt_disable()" to protect against CPU's coming and going
> - use "stop_machine()" or similar that already honors preemption, and
> which I trust a whole lot more than freezer.
> - .. especially since this is already how we are supposed to be protected
> against CPU's going away, and we've already started doing that (for an
> example of this, see things like e18f3ffb9c from Andrew)

Indeed, this is how it was supposed to work.

Note that it is possible to make stop_machine() an even larger hammer,
by scheduler mods to flush all the preempted tasks. This would drop the
requirement for preempt_disable().

But cute as that would be, I've been waiting until someone demonstrates
an actual need...

Rusty.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/