2015-06-02 08:38:20

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available

On Tue, Jun 02, 2015 at 02:32:19PM +0900, [email protected] wrote:
> Before kexec soft reboot, secondary CPU's IRQs except for per-cpu twd are
> migrated from a CPU going offline to CPU0 by migrate_irqs(). The twd is
> stopped by twd_timer_cpu_notify(). As a result, secondary CPU has no
> interrupt source before entering WFI loop.

I wasn't thinking of SPIs and PPIs, but SGIs - the IPI interrupts coming
from the boot CPU.

> After staring kexec'd kernel, all interrupts are sent to CPU0 by default
> and CPU0 resets the secondary CPUs in socfpga_boot_secondary().
> I think it's the reason why kexec in socfpga succeeds.

If you have a way to reset CPU0, why are you not using this for hotplug
when a CPU is hot-unplugged?

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


2015-06-02 23:41:01

by Hiraku Toyooka

[permalink] [raw]
Subject: Re: [PATCH] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available

Hello, Russell,

On 2015/06/02 17:38, Russell King - ARM Linux wrote:
> I wasn't thinking of SPIs and PPIs, but SGIs - the IPI interrupts coming
> from the boot CPU.

All tasks in a CPU going offline are migrated to other CPUs(finally
CPU0) and the rq is marked with offline before the CPU entering WFI
loop. So IPI is not sent to the secondary CPU.

> If you have a way to reset CPU0, why are you not using this for hotplug
> when a CPU is hot-unplugged?

I think you mean "way to reset CPU1". If so, the reason is an increase
in power consumption in usual hotplug. This is discussed before between
Alan Tull and you. (https://lkml.org/lkml/2014/9/25/37)

Best regards,
Hiraku Toyooka

2015-06-02 23:52:53

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available

On Wed, Jun 03, 2015 at 08:40:51AM +0900, Hiraku Toyooka wrote:
> Hello, Russell,
>
> On 2015/06/02 17:38, Russell King - ARM Linux wrote:
> > I wasn't thinking of SPIs and PPIs, but SGIs - the IPI interrupts coming
> > from the boot CPU.
>
> All tasks in a CPU going offline are migrated to other CPUs(finally
> CPU0) and the rq is marked with offline before the CPU entering WFI
> loop. So IPI is not sent to the secondary CPU.
>
> > If you have a way to reset CPU0, why are you not using this for hotplug
> > when a CPU is hot-unplugged?
>
> I think you mean "way to reset CPU1". If so, the reason is an increase
> in power consumption in usual hotplug. This is discussed before between
> Alan Tull and you. (https://lkml.org/lkml/2014/9/25/37)

Please put a comment in your hotplug code describing this, so I'm
not likely to ask again (and I don't have to remember that I've
asked the question.) Thanks.

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.