Re: [PATCH]x86, reboot: Fix a warning message triggered bystop_other_cpus()

From: Don Zickus
Date: Tue May 22 2012 - 09:34:06 EST


On Tue, May 22, 2012 at 10:52:33AM +0800, Feng Tang wrote:
>
> The root cause seems to be the default_send_IPI_mask_allbutself_phys()
> takes quiet some time (I measured it could be several ms) to complete
> sending NMIs to all the other 23 CPUs, and for HZ=250/1000 system, the

I sent Ingo a patch (which he took in), that reverts this path to interrupts
again (and NMIs as a fallback if it fails). The problem will still exist
I assume though I don't know if it changes the timing characteristics.

> time is long enough for a timer interrupt to happen, which will in
> turn trigger to kick load balance to a stopped CPU and cause this
> warning in native_smp_send_reschedule().
>
> So disabling the local irq before stop_other_cpu() can fix this
> problem (tested 25 times reboot ok), and it is fine as there should
> be nobody caring the timer interrupt in such reboot stage.

It seems to be fine. I just do not know enough about the load balancing
the timer interrupt does to know if this is the right way to go or not.

So from the shutdown cpu perspective, you are just blocking the interrupt
from occurring while we shutdown the other cpus, which prevents the load
balancer from running and seeing cpus disappear beneath it. Sounds
reasonable.

Though on the other hand the same interrupt on another cpu might spit out
the same warning as cpus disappear without notification if it tries to
reschedule. Probably rare and the window is probably small as the cpus
would probably all 'stop' rather quickly.

I don't know. I guess it is ok.

Cheers,
Don
--
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/