Re: [PATCH 07/27] x86, smpboot: Use generic SMP bootinginfrastructure

From: Thomas Gleixner
Date: Mon Jun 04 2012 - 10:30:14 EST


On Fri, 1 Jun 2012, Srivatsa S. Bhat wrote:
> From: Nikunj A. Dadhania <nikunj@xxxxxxxxxxxxxxxxxx>
>
> Convert x86 to use the generic framework to boot secondary CPUs.
>
> Notes:
> 1. x86 manipulates the cpu_online_mask under vector_lock. So, while
> converting over to the generic smp booting code, override arch_vector_lock()
> and arch_vector_unlock() to lock_vector_lock() and unlock_vector_lock()
> respectively.
>
> 2. In smp_callin(), we allow the master to continue as soon as the physical
> booting of the secondary processor is done. That is, we don't wait till the
> CPU_STARTING notifications are sent.
>
> Implications:
> - This does not alter the order in which the notifications are sent (i.e.,
> still CPU_STARTING is followed by CPU_ONLINE) because the master waits till
> the new cpu is set in the cpu_online_mask before returning to generic code.
>
> - This approach is better because of 2 reasons:
> a. It makes more sense: the master has a timeout for waiting on the
> cpu_callin_map - which means we should report back as soon as possible.
> The whole idea of having a timeout is to estimate the maximum time that
> could be taken for physical booting. This approach separates out the
> physical booting vs running CPU hotplug callbacks and reports back to
> the master as soon as physical booting is done.

How do you deal with the problem that the master does not come back in
time? There is a timeout on the booting side as well. I haven't found
out why this timeout exists at all, but we need to take care of that
and there is a patch on LKML which removes the panic as this can
happen on virt. I really wonder whether the hardware for which this
timeout stuff was introduced still exists or whether we can simply get
rid of it completely.

Also the whole callin/callout mask business wants to be in the generic
code. It can be replaced completely by cpu_state, at least that's what
I was aiming for. There is no need for several variables tracking the
same thing in different ways.

Thanks,

tglx


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