Re: [PATCH RESEND v4] reboot: support offline CPUs before reboot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Rob Landley <rob@xxxxxxxxxxx>
- Subject: Re: [PATCH RESEND v4] reboot: support offline CPUs before reboot
- From: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
- Date: Fri, 17 Jan 2020 12:20:56 +0800
- Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Jiri Kosina <jkosina@xxxxxxx>, Pavankumar Kondeti <pkondeti@xxxxxxxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Aaro Koskinen <aaro.koskinen@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, James Morse <james.morse@xxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Guenter Roeck <groeck@xxxxxxxxxxxx>, Stephen Boyd <swboyd@xxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, linux-csky@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, Linux PM <linux-pm@xxxxxxxxxxxxxxx>
- In-reply-to: <a701522f-73aa-2277-4a25-f84a27f38118@landley.net>
- References: <20200114110620.164861-1-hsinyi@chromium.org> <a701522f-73aa-2277-4a25-f84a27f38118@landley.net>
On Fri, Jan 17, 2020 at 12:16 PM Rob Landley <rob@xxxxxxxxxxx> wrote:
>
> On 1/14/20 5:06 AM, Hsin-Yi Wang wrote:
> > This patch adds a config ARCH_OFFLINE_CPUS_ON_REBOOT, which would offline cpus in
> > migrate_to_reboot_cpu(). If non reboot cpus are all offlined here, the loop for
> > checking online cpus would be an empty loop. If architecture don't enable this
> > config, or some cpus somehow fails to offline, it would fallback to ipi
> > function.
>
> I'm curious:
>
> > +# Select to do a full offline on secondary CPUs before reboot.
> > +config ARCH_OFFLINE_CPUS_ON_REBOOT
> > + bool "Support for offline CPUs before reboot"
> > + depends on HOTPLUG_CPU
>
> The new symbol can't be selected without the other symbol.
>
> > + select ARCH_OFFLINE_CPUS_ON_REBOOT if HOTPLUG_CPU
>
> And the other symbol automatically selects the new one.
>
> Why are you adding a second symbol that means the same thing as the existing symbol?
>
I should make the arch selecting this symbol in other patches and let
the arch decides if they want to opt in, as Thomas pointed out in v5:
https://lore.kernel.org/lkml/8736cgxmxi.fsf@xxxxxxxxxxxxxxxxxxxxxxx/
Current solution is not sufficient since it only solve problems for
system that enables HOTPLUG_CPU.
> > +#if defined(CONFIG_PM_SLEEP_SMP) || defined(CONFIG_ARCH_OFFLINE_CPUS_ON_REBOOT)
> > +extern int freeze_secondary_cpus(int primary, bool reboot);
> > +#endif
>
> Couldn't that just test HOTPLUG_CPU? What's the second symbol for? (You can have
> empty stub functions when architectures don't support a thing...)
>
> Rob
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]