Shutdown from reboot_cpuid without stopping other cpus.
Subsystems (3)
cover Shutdown from reboot_cpuid without stopping other cpus.
We recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f.
The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the reboot_cpu and then continuing with shutdown/reboot.
The patch set is broken into five parts. The first two are planned for the stable release. The others move the halt/shutdown/reboot related functions to their own kernel/reboot.c file and then introduce the kernel boot parameter.
Changes since -v5.
- Moved the arch/x86 reboot= up to the generic kernel code.
Changes since -v4.
- Integrated Srivatsa S. Bhat creating cpu_hotplug_disable() function
- Integrated comments by Srivatsa S. Bhat.
- Made one more comment consistent with others in function.
Changes since -v3.
- Added a tested-by for the original reporter.
- Fix compile failure found by Joe Perches.
- Integrated comments by Joe Perches.
PATCH 1/5 CPU hotplug: Provide a generic helper to disable/enable CPU hotplug
From: "Srivatsa S. Bhat" <[email protected]>
There are instances in the kernel where we would like to disable CPU hotplug (from sysfs) during some important operation. Today the freezer code depends on this and the code to do it was kinda tailor-made for that.
Restructure the code and make it generic enough to be useful for other usecases too.
To: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Russ Anderson <[email protected]>
Cc: Linux Kernel Mailing List <[email protected]>
Cc: the arch/x86 maintainers <[email protected]>
--- include/linux/cpu.h | 2 ++ kernel/cpu.c | 27 +++++++++------------------ 2 files changed, 11 insertions(+), 18 deletions(-)
include/linux/cpu.h +2 -0
@@ -141,6 +141,8 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) }#endif +extern void cpu_hotplug_disable (void ); +extern void cpu_hotplug_enable (void );int cpu_up (unsigned int cpu);void notify_cpu_starting (unsigned int cpu);extern void cpu_maps_update_begin (void );
kernel/cpu.c +9 -18
@@ -541,29 +541,20 @@ static int __init alloc_frozen_cpus(void)core_initcall (alloc_frozen_cpus);/* -* Prevent regular CPU hotplug from racing with the freezer, by disabling CPU -* hotplug when tasks are about to be frozen. Also, don't allow the freezer -* to continue until any currently running CPU hotplug operation gets -* completed. -* To modify the 'cpu_hotplug_disabled' flag, we need to acquire the -* 'cpu_add_remove_lock'. And this same lock is also taken by the regular -* CPU hotplug path and released only after it is complete. Thus, we -* (and hence the freezer) will block here until any currently running CPU -* hotplug operation gets completed. +* Wait for currently running CPU hotplug operations to complete (if any) and +* disable future CPU hotplug (from sysfs). The 'cpu_add_remove_lock' protects +* the 'cpu_hotplug_disabled' flag. The same lock is also acquired by the +* hotplug path before performing hotplug operations. So acquiring that lock +* guarantees mutual exclusion from any currently running hotplug operations. */ -void cpu_hotplug_disable_before_freeze (void ) +void cpu_hotplug_disable (void ) {cpu_maps_update_begin (); cpu_hotplug_disabled =1 ;cpu_maps_update_done (); } - -/* -* When tasks have been thawed, re-enable regular CPU hotplug (which had been -* disabled while beginning to freeze tasks). -*/ -void cpu_hotplug_enable_after_thaw (void ) +void cpu_hotplug_enable (void ) {cpu_maps_update_begin (); cpu_hotplug_disabled =0 ;
@@ -589,12 +580,12 @@ cpu_hotplug_pm_callback(struct notifier_block *nb,case PM_SUSPEND_PREPARE :case PM_HIBERNATION_PREPARE : -cpu_hotplug_disable_before_freeze (); +cpu_hotplug_disable ();break ;case PM_POST_SUSPEND :case PM_POST_HIBERNATION : -cpu_hotplug_enable_after_thaw (); +cpu_hotplug_enable ();break ;default :
Signature · 1 line
1.8.1.2
PATCH 2/5 Migrate shutdown/reboot to boot cpu.
In reply to Robin HoltWe recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f.
The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the boot cpu and then continuing with shutdown/reboot.
This also has the effect of not breaking x86's command line parameter for specifying the reboot cpu. Note, this code was shamelessly copied from arch/x86/kernel/reboot.c with bits removed pertaining to the reboot_cpu command line parameter.
To: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Russ Anderson <[email protected]>
Cc: Linux Kernel Mailing List <[email protected]>
Cc: the arch/x86 maintainers <[email protected]>
Cc: <[email protected]>
---
Changes since -v4.
- Integrated comments from Srivatsa S. Bhat
- Used new cpu_hotplug_disable() function.
- Added 'static' to new function.
Changes since -v1.
- Set PF_THREAD_BOUND before migrating to eliminate potential race.
- Modified kernel_power_off to also migrate instead of using disable_nonboot_cpus().
--- kernel/sys.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
kernel/sys.c +21 -3
@@ -357,6 +357,24 @@ int unregister_reboot_notifier(struct notifier_block *nb) }EXPORT_SYMBOL (unregister_reboot_notifier); +static void migrate_to_reboot_cpu (void ) +{ +/* The boot cpu is always logical cpu 0 */ +int reboot_cpu_id =0 ; + +cpu_hotplug_disable (); + +/* Make certain the cpu I'm about to reboot on is online */ +if (!cpu_online (reboot_cpu_id)) + reboot_cpu_id =cpumask_first (cpu_online_mask); + +/* Prevent races with other tasks migrating this task */ + current->flags |=PF_THREAD_BOUND ; + +/* Make certain I only run on the appropriate processor */ +set_cpus_allowed_ptr (current,cpumask_of (reboot_cpu_id)); +} +/** * kernel_restart - reboot the system * @cmd: pointer to buffer containing command to execute for restart
@@ -368,7 +386,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier);void kernel_restart (char *cmd) {kernel_restart_prepare (cmd); -disable_nonboot_cpus (); +migrate_to_reboot_cpu ();syscore_shutdown ();if (!cmd)printk (KERN_EMERG "Restarting system.\n" );
@@ -395,7 +413,7 @@ static void kernel_shutdown_prepare(enum system_states state)void kernel_halt (void ) {kernel_shutdown_prepare (SYSTEM_HALT ); -disable_nonboot_cpus (); +migrate_to_reboot_cpu ();syscore_shutdown ();printk (KERN_EMERG "System halted.\n" );kmsg_dump (KMSG_DUMP_HALT );
@@ -414,7 +432,7 @@ void kernel_power_off(void)kernel_shutdown_prepare (SYSTEM_POWER_OFF );if (pm_power_off_prepare)pm_power_off_prepare (); -disable_nonboot_cpus (); +migrate_to_reboot_cpu ();syscore_shutdown ();printk (KERN_EMERG "Power down.\n" );kmsg_dump (KMSG_DUMP_POWEROFF );
Signature · 1 line
1.8.1.2
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
Quoted 20 lines · On Wed, 24 Apr 2013 06:18:50 -0500 Robin Holt <[email protected]> wrote:
We recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f.
The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the boot cpu and then continuing with shutdown/reboot.
This also has the effect of not breaking x86's command line parameter for specifying the reboot cpu. Note, this code was shamelessly copied from
arch/x86/kernel/reboot.cwith bits removed pertaining to thereboot_cpucommand line parameter.kernel/sys.c +3
-0@@ -357,6 +357,24 @@ int unregister_reboot_notifier(struct notifier_block *nb) }EXPORT_SYMBOL (unregister_reboot_notifier); +static void migrate_to_reboot_cpu (void ) +{ +/* The boot cpu is always logical cpu 0 */
kernel/sys.c int unregister_reboot_notifier(struct notifier_block *nb) · line 372
Quoted 10 lines
kernel/sys.c +10
-0+int reboot_cpu_id =0 ; + +cpu_hotplug_disable (); + +/* Make certain the cpu I'm about to reboot on is online */ +if (!cpu_online (reboot_cpu_id)) + reboot_cpu_id =cpumask_first (cpu_online_mask); + +/* Prevent races with other tasks migrating this task */ + current->flags |=PF_THREAD_BOUND ;
PF_THREAD_BOUND was removed/replaced in linux-next's a9ab775bc ("workqueue: directly restore CPU affinity of workers from CPU_ONLINE")
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
Quoted 8 lines · On Wed, 24 Apr 2013 15:17:49 -0700 Andrew Morton <[email protected]>…
Quoted 8 lines
kernel/sys.c +8
-0+static void migrate_to_reboot_cpu (void ) +{ +/* The boot cpu is always logical cpu 0 */ +int reboot_cpu_id =0 ; + +cpu_hotplug_disable (); + +/* Make certain the cpu I'm about to reboot on is online */
Quoted 8 lines
kernel/sys.c int unregister_reboot_notifier(struct notifier_block *nb) · line 372
Quoted 5 lines
kernel/sys.c +5
-0+if (!cpu_online (reboot_cpu_id)) + reboot_cpu_id =cpumask_first (cpu_online_mask); + +/* Prevent races with other tasks migrating this task */ + current->flags |=PF_THREAD_BOUND ;
PF_THREAD_BOUNDwas removed/replaced in linux-next'sa9ab775bc("workqueue: directly restore CPU affinity of workers fromCPU_ONLINE")
Which means that we'll need an updated patchset for 3.10-rc1, please. And when Greg discovers that the patch won't backport correctly, please provide him with the 3.9.1 version.
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
In reply to Andrew MortonQuoted 19 lines · Andrew Morton
Quoted 17 lines · On Wed, 24 Apr 2013 06:18:50 -0500 Robin Holt <[email protected]> wrote:
We recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f.
The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the boot cpu and then continuing with shutdown/reboot.
This also has the effect of not breaking x86's command line parameter for specifying the reboot cpu. Note, this code was shamelessly copied from
arch/x86/kernel/reboot.cwith bits removed pertaining to thereboot_cpucommand line parameter.kernel/sys.c +0
-0@@ -357,6 +357,24 @@ int unregister_reboot_notifier(struct notifier_block *nb) }EXPORT_SYMBOL (unregister_reboot_notifier);
Quoted 16 lines
kernel/sys.c int unregister_reboot_notifier(struct notifier_block *nb) · line 372
Quoted 13 lines
kernel/sys.c +13
-0+static void migrate_to_reboot_cpu (void ) +{ +/* The boot cpu is always logical cpu 0 */ +int reboot_cpu_id =0 ; + +cpu_hotplug_disable (); + +/* Make certain the cpu I'm about to reboot on is online */ +if (!cpu_online (reboot_cpu_id)) + reboot_cpu_id =cpumask_first (cpu_online_mask); + +/* Prevent races with other tasks migrating this task */ + current->flags |=PF_THREAD_BOUND ;
PF_THREAD_BOUNDwas removed/replaced in linux-next'sa9ab775bc("workqueue: directly restore CPU affinity of workers fromCPU_ONLINE")
I don't see PF_THREAD_BOUND being removed by commit a9ab775bc. Did you mean some other commit?
Thanks,
Ingo
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
Quoted 5 lines · On Thu, 25 Apr 2013 08:57:04 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 2 lines
PF_THREAD_BOUNDwas removed/replaced in linux-next'sa9ab775bc("workqueue: directly restore CPU affinity of workers fromCPU_ONLINE")I don't see
PF_THREAD_BOUNDbeing removed by commita9ab775bc. Did you mean some other commit?
commit 14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6
Author: Tejun Heo <[email protected]> Date: Tue Mar 19 13:45:20 2013 -0700
sched: replace PF_THREAD_BOUND with PF_NO_SETAFFINITY
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
Quoted 5 lines · Andrew Morton
Quoted 3 lines · On Thu, 25 Apr 2013 08:57:04 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 2 lines
PF_THREAD_BOUNDwas removed/replaced in linux-next'sa9ab775bc("workqueue: directly restore CPU affinity of workers fromCPU_ONLINE")
Quoted 8 lines
Quoted 2 lines
I don't see
PF_THREAD_BOUNDbeing removed by commita9ab775bc. Did you mean some other commit?commit
14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6Author: Tejun Heo <[email protected]> Date: Tue Mar 19 13:45:20 2013 -0700sched: replace
PF_THREAD_BOUNDwithPF_NO_SETAFFINITY
I don't think much action is needed: whenever someone integrates the workqueue tree with these reboot changes, or the workqueue changes hit upstream, a s/PF_THREAD_BOUND/PF_NO_SETAFFINITY should do the trick, right?
Btw., if that's true then the workqueue tree should probably grow this helper:
#define PF_THREAD_BOUND PF_NO_SETAFFINITY
migration/backport helper, which can be removed in v3.11 or so.
Thanks,
Ingo
Re: [PATCH -v6 2/5] Migrate shutdown/reboot to boot cpu.
Quoted 22 lines · Ingo Molnar
Quoted 5 lines · Andrew Morton
Quoted 3 lines · On Thu, 25 Apr 2013 08:57:04 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 2 lines
PF_THREAD_BOUNDwas removed/replaced in linux-next'sa9ab775bc("workqueue: directly restore CPU affinity of workers fromCPU_ONLINE")Quoted 8 lines
Quoted 2 lines
I don't see
PF_THREAD_BOUNDbeing removed by commita9ab775bc. Did you mean some other commit?commit
14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6Author: Tejun Heo <[email protected]> Date: Tue Mar 19 13:45:20 2013 -0700sched: replace
PF_THREAD_BOUNDwithPF_NO_SETAFFINITYI don't think much action is needed: whenever someone integrates the workqueue tree with these reboot changes, or the workqueue changes hit upstream, a s/PF_THREAD_BOUND/PF_NO_SETAFFINITY should do the trick, right?
Quoted 4 lines
Btw., if that's true then the workqueue tree should probably grow this helper:
#define PF_THREAD_BOUND PF_NO_SETAFFINITY
Andrew, how about I add:
kernel/reboot.c +3 -0
@@ -155,6 +155,9 @@ static int __init reboot_setup(char *str) }__setup ("reboot=" , reboot_setup); +#ifndef PF_THREAD_BOUND +#define PF_THREAD_BOUND PF_NO_SETAFFINITY +#endif static void migrate_to_reboot_cpu (void ) {
to this patch and then add another patch to the series to remove those. That will make the stable pull more clear and accomplish the same final outcome.
Thanks,
Robin
PATCH 3/5 Move shutdown/reboot related functions to kernel/reboot.c
In reply to Robin HoltThis patch is preparatory. It moves reboot related syscall, etc functions from kernel/sys.c to kernel/reboot.c.
To: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Russ Anderson <[email protected]>
Cc: Linux Kernel Mailing List <[email protected]>
Cc: the arch/x86 maintainers <[email protected]>
--- kernel/Makefile | 2 +- kernel/reboot.c | 331 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sys.c | 317 ----------------------------------------------------- 3 files changed, 332 insertions(+), 318 deletions(-) create mode 100644 kernel/reboot.c
kernel/Makefile +1 -1
@@ -9,7 +9,7 @@ obj-y = fork.o exec_domain.o panic.o printk.o \ rcupdate.o extable.o params.o posix-timers.o \ kthread.o wait.o sys_ni.o posix-cpu-timers.o mutex.o \ hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ - notifier.o ksysfs.o cred.o \ + notifier.o ksysfs.o cred.o reboot.o \ async.o range.o groups.o lglock.o smpboot.o ifdef CONFIG_FUNCTION_TRACER
kernel/reboot.c new file +331 -0
331 lines not on this page · raw message
kernel/sys.c +0 -317
326 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 4/5 checkpatch.pl the new kernel/reboot.c file.
In reply to Robin HoltI did allow the remaining 81 character line behind. It did not seem like it was worth changing. Otherwise, it now passes checkpatch.pl.
To: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Russ Anderson <[email protected]>
Cc: Linux Kernel Mailing List <[email protected]>
Cc: the arch/x86 maintainers <[email protected]>
---
Changes since -v3:
Integrated feedback from Joe Perches.
--- kernel/reboot.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
kernel/reboot.c +11 -13
@@ -4,6 +4,8 @@* Copyright (C) 2013 Linus Torvalds */ +#define pr_fmt (fmt) "reboot: " fmt +#include <linux/export.h> #include <linux/kexec.h> #include <linux/kmod.h>
@@ -99,9 +101,9 @@ void kernel_restart(char *cmd)migrate_to_reboot_cpu ();syscore_shutdown ();if (!cmd) -printk (KERN_EMERG "Restarting system.\n" ); +pr_emerg ("Restarting system\n" );else -printk (KERN_EMERG "Restarting system with command '%s'.\n" , cmd); +pr_emerg ("Restarting system with command '%s'\n" , cmd);kmsg_dump (KMSG_DUMP_RESTART );machine_restart (cmd); }
@@ -110,7 +112,7 @@ EXPORT_SYMBOL_GPL(kernel_restart);static void kernel_shutdown_prepare (enum system_states state) {blocking_notifier_call_chain (&reboot_notifier_list, - (state ==SYSTEM_HALT )?SYS_HALT :SYS_POWER_OFF ,NULL ); + (state ==SYSTEM_HALT ) ?SYS_HALT :SYS_POWER_OFF ,NULL ); system_state = state;usermodehelper_disable ();device_shutdown ();
@@ -125,11 +127,10 @@ void kernel_halt(void)kernel_shutdown_prepare (SYSTEM_HALT );migrate_to_reboot_cpu ();syscore_shutdown (); -printk (KERN_EMERG "System halted.\n" ); +pr_emerg ("System halted\n" );kmsg_dump (KMSG_DUMP_HALT );machine_halt (); } -EXPORT_SYMBOL_GPL (kernel_halt);/**
@@ -144,7 +145,7 @@ void kernel_power_off(void)pm_power_off_prepare ();migrate_to_reboot_cpu ();syscore_shutdown (); -printk (KERN_EMERG "Power down.\n" ); +pr_emerg ("Power down\n" );kmsg_dump (KMSG_DUMP_POWEROFF );machine_power_off (); }
@@ -173,10 +174,10 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,/* For safety, we require "magic" arguments. */ if (magic1 !=LINUX_REBOOT_MAGIC1 || - (magic2 !=LINUX_REBOOT_MAGIC2 && - magic2 !=LINUX_REBOOT_MAGIC2A && + (magic2 !=LINUX_REBOOT_MAGIC2 && + magic2 !=LINUX_REBOOT_MAGIC2A && magic2 !=LINUX_REBOOT_MAGIC2B && - magic2 !=LINUX_REBOOT_MAGIC2C )) + magic2 !=LINUX_REBOOT_MAGIC2C ))return -EINVAL ;/*
@@ -285,14 +286,11 @@ static int __orderly_poweroff(bool force) ret =call_usermodehelper (argv[0 ], argv, envp,UMH_WAIT_EXEC );argv_free (argv); }else { -printk (KERN_WARNING "%s failed to allocate memory for \"%s\"\n" , - __func__, poweroff_cmd); ret = -ENOMEM ; }if (ret && force) { -printk (KERN_WARNING "Failed to start orderly shutdown: " -"forcing the issue\n" ); +pr_warn ("Failed to start orderly shutdown: forcing the issue\n" );/* * I guess this should try to kick off some daemon to sync and * poweroff asap. Or not even bother syncing if we're doing an
Signature · 1 line
1.8.1.2
PATCH 5/5 Move arch/x86 reboot= handling to generic kernel.
In reply to Robin HoltSince arch/x86 has the most extensive reboot= handling and it appears to have no effect on the remaining architectures. This patch moves that reboot= handling from arch/x86 to the generic kernel.
To: Andrew Morton <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Russ Anderson <[email protected]>
Cc: Linux Kernel Mailing List <[email protected]>
Cc: the arch/x86 maintainers <[email protected]>
--- Documentation/kernel-parameters.txt | 14 ++++- arch/x86/kernel/reboot.c | 113 +++--------------------------------- kernel/reboot.c | 96 ++++++++++++++++++++++++++++-- 3 files changed, 109 insertions(+), 114 deletions(-)
Documentation/kernel-parameters.txt +11 -3
@@ -2616,9 +2616,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted. Run specified binary instead of /init from the ramdisk, used for early userspace startup. See initrd. - reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode - Format: <reboot_mode>[,<reboot_mode2>[,...]] - See arch/*/kernel/reboot.c or arch/*/kernel/process.c + reboot= [KNL] + Format: + [w[arm] | c[old]] \ + [,b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \ + [,f[orce] \ + [,] s[mp]#### + Where reboot_mode is one of warm or cold, + reboot_type is one of bios, acpi, kbd, triple, efi, or pci, + reboot_force is either force or not specified, + and reboot_cpu is s[mp]#### with #### being the + processor to be used for rebooting. relax_domain_level= [KNL, SMP] Set scheduler's default relax_domain_level.
arch/x86/kernel/reboot.c +7 -106
133 lines not on this page · raw message
kernel/reboot.c +91 -5
119 lines not on this page · raw message
Signature · 1 line
1.8.1.2
Re: [PATCH -v6 5/5] Move arch/x86 reboot= handling to generic kernel.
Quoted 4 lines · On Wed, 24 Apr 2013 06:18:53 -0500 Robin Holt <[email protected]> wrote:
Since
arch/x86has the most extensive reboot= handling and it appears to have no effect on the remaining architectures. This patch moves that reboot= handling fromarch/x86to the generic kernel.
This seems incomplete. These, in arch/x86/kernel/reboot.c
extern int reboot_mode;
extern enum reboot_type reboot_type;
extern int reboot_force;
extern int reboot_default;
should surely be moved into include/linux/reboot.h. But `enum reboot_type' remains stuck over in arch/x86/include/asm/emergency-restart.h.
Andrew,
Please go ahead and kill this patch set. It breaks with !CONFIG_SMP and breaks on arm. I spent time today getting an arm cross compiler working and fixing up the build. It indicates there is more work to be done beyond your comments for the reboot_mode parameter. I should have a newer patch set tomorrow, but it will need to go through arm and unicore32 reviews as it will affect both of them as well.
Robin
Quoted 31 lines · Robin Holt
We recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f.
The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the
reboot_cpuand then continuing with shutdown/reboot.The patch set is broken into five parts. The first two are planned for the stable release. The others move the halt/shutdown/reboot related functions to their own
kernel/reboot.cfile and then introduce the kernel boot parameter.Changes since -v5.
- Moved thearch/x86reboot= up to the generic kernel code.Changes since -v4.
- Integrated Srivatsa S. Bhat creatingcpu_hotplug_disable()function- Integrated comments by Srivatsa S. Bhat.
- Made one more comment consistent with others in function.
Changes since -v3.
- Added a tested-by for the original reporter.- Fix compile failure found by Joe Perches.
- Integrated comments by Joe Perches.