Re: [Fastboot] Re: [PATCH][4/6]Register snapshotting before kexec boot

From: Eric W. Biederman
Date: Sun Sep 19 2004 - 15:22:02 EST


Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> writes:

> On Thu, Sep 16, 2004 at 08:41:13AM +0000, Dipankar Sarma wrote:
> > On Wed, Sep 15, 2004 at 02:27:22PM -0700, Andrew Morton wrote:
> > > Is dodgy wrt CPU hotplug, but there's not a lot we can do about that
> > > in this context, I expect. Which is a shame, given that CPU hotplug
> > > is a likely time at which to be taking a crashdump ;)
> >
> > If Hari disables preemption during this entire section of code,
> > he should be safe from CPU hotplug, AFAICS. The stop machine
> > threads will never get to run on that CPU.
>
> This will work for CPU remove, not CPU add, since the later
> is not atomic (yet).
>
> Rusty, do you think it would be worthwhile making CPU add atomic?
> I can give it a shot :)

The whole section should be run with interrupts disabled,
so disabling preemption should be trivial.

Beyond this the code needs a bogomips based timeout, (we can't use external
time sources just the delay loop). Any of the other cpu's could have
crashed at this point, or our accounting data structures could be
currupt.

Putting the initial call inside of machine_kexec is also bogus.
crash_machine_kexec needs to call crash_stop_cpus and then
machine_kexec. machine_kexec is currently factored as a perfectly
reusable piece of code let's not mess that up.

Eric
-
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/