Re: [PATCH] MIPS: smp: report dying CPU to RCU in stop_this_cpu()

From: Sebastian Andrzej Siewior

Date: Fri Jun 05 2026 - 06:43:43 EST


On 2026-06-05 09:12:09 [+0200], Jonas Jelonek wrote:
> Hi Sebastian,
Hi,

> >> Call rcutree_report_cpu_dead() once interrupts are disabled, mirroring the
> >> generic CPU-hotplug offline path (and arm64's stop handling), so RCU stops
> >> waiting on the parked CPUs and grace periods can still complete.
> > This is part of cpuhp_report_idle_dead(). Is it now invoked twice? Or is
> > something else missing/ different?
>
> Those seem to be two different paths. To be honest I'm not confident
> under which circumstances which of those paths is used to take down
> a CPU. In my case, issuing a reboot command reaches smp_send_stop()
> where the issue explained in the patch message then happens.
>

Does
echo 0 > /sys/devices/system/cpu/cpu1/online

lead to the same problem?

I missed that arm64 has also this but only if the online path fails kind
of early, see
04e613ded8c26 ("arm64: smp: Tell RCU about CPUs that fail to come online")

so this not the "normal" case but an exception. Mips seems to be doing
something different here. I am not sure if this is the only thing that
is missing.

> Best,
> Jonas

Sebastian