Re: [PATCH 2/2] Enter 2nd kernel with BSP

From: Eric W. Biederman
Date: Tue Apr 24 2012 - 06:42:18 EST


Andi Kleen <andi@xxxxxxxxxxxxxx> writes:

>> native_cpu_up avoids to wake up cpu with boot_cpu_physical_apicid, but
>
> Ok so that check needs to go then. I wonder why it is there.

As I remember we had a check to avoid waking up the current cpu
we are running on, and there was something about the value for
the current cpu coming from BIOS tables etc. Because of all of the
silliness in how we get the apicid for the current cpu I seem to
remember the case where we start all of our secondary processors
to periodically regress.

>> the boot_cpu_physical_apicid would be just a boot cpu now, which could
>> be non-BSP on the 2nd kernel; equal to crashing cpu on the 1st
>> kernel. It would need to check explicitly whether a given cpu is BSP
>> or not and this would be better fix here. This is suggested by Eric.

Yes. My two reasons for designing the crash path the way I did was
that we might have offlined/hot-unplugged the boot cpu, or the bootcpu
might have gotten itself into a terrible state. Since we want as much
reliability in kexec on panic we don't bother trying to restore it.

The normal reboot path, and a normal kexec tries to reboot on the boot
cpu primarily because there are a lot of BIOS's out there that if you
talk to them on anything other than the boot cpu they get confused.

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/