Re: [PATCH v5] reboot: support offline CPUs before reboot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Sudeep Holla <sudeep.holla@xxxxxxx>
- Subject: Re: [PATCH v5] reboot: support offline CPUs before reboot
- From: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
- Date: Thu, 16 Jan 2020 17:25:43 +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: <20200115114112.GA3663@bogus>
- References: <20200115063410.131692-1-hsinyi@chromium.org> <20200115114112.GA3663@bogus>
On Wed, Jan 15, 2020 at 7:41 PM Sudeep Holla <sudeep.holla@xxxxxxx> wrote:
>
> On Wed, Jan 15, 2020 at 02:34:10PM +0800, Hsin-Yi Wang wrote:
> > Currently system reboots uses architecture specific codes (smp_send_stop)
> > to offline non reboot CPUs. Most architecture's implementation is looping
> > through all non reboot online CPUs and call ipi function to each of them. Some
> > architecture like arm64, arm, and x86... would set offline masks to cpu without
> > really offline them. This causes some race condition and kernel warning comes
> > out sometimes when system reboots.
> >
> > 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.
> >
>
> What's the timing impact on systems with large number of CPUs(say 256 or
> more) ? I remember we added some change to reduce the wait times for
> offlining CPUs in system suspend path on arm64, still not negligible.
>
This is not the final solution, but I would still provided some data
points here:
Tested on my arm64 with 4 cpu: 2 a53 and 2 a72.
Offlining 3 cpu takes about 60~65 ms
Offlining 2 cpu(a53+a72 or a72+a72) takes about 42~47 ms
Offlining 1 cpu(a53 or a72) takes about 23~25 ms.
It would take longer time for systems with large number of CPUs.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]