rpms/kernel/F-9 linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch, NONE, 1.1 config-generic, 1.115, 1.116 kernel.spec, 1.776, 1.777
Chuck Ebbert
cebbert at fedoraproject.org
Wed Oct 1 17:19:58 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31023
Modified Files:
config-generic kernel.spec
Added Files:
linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch
Log Message:
Add config option to disallow adding CPUs after booting.
linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch:
--- NEW FILE linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch ---
From: Chuck Ebbert <cebbert at redhat.com>
x86: allow number of additional hotplug CPUs to be set at compile time
The default number of additional CPU IDs for hotplugging is determined
by asking ACPI or mptables how many "disabled" CPUs there are in the
system, but many systems get this wrong so that e.g. a uniprocessor
machine gets an extra CPU allocated and never switches to single CPU
mode.
And sometimes CPU hotplugging is enabled only for suspend/hibernate
anyway, so the additional CPU IDs are not wanted. Allow the number
to be set to zero at compile time.
Tested on uniprocessor x86_64 with CPU hotplugging configured.
("After" has the number of additional CPUs set to 0.)
Before: NR_CPUS: 512, nr_cpu_ids: 2, nr_node_ids 1
After: NR_CPUS: 512, nr_cpu_ids: 1, nr_node_ids 1
Signed-off-by: Chuck Ebbert <cebbert at redhat.com>
---
Index: linux-2.6.26.noarch/arch/x86/Kconfig
===================================================================
--- linux-2.6.26.noarch.orig/arch/x86/Kconfig
+++ linux-2.6.26.noarch/arch/x86/Kconfig
@@ -1299,6 +1299,24 @@ config HOTPLUG_CPU
Say N if you want to disable CPU hotplug and don't need to
suspend.
+config HOTPLUG_DEFAULT_ADDITIONAL_CPUS
+ def_bool y
+ prompt "Allocate extra CPUs for hotplugging after boot" if HOTPLUG_CPU
+ ---help---
+ Say yes here to use the default, which allows as many CPUs as are marked
+ "disabled" by ACPI or MPTABLES to be hotplugged after bootup.
+
+ Say no if you do not want to allow CPUs to be added after booting, for
+ example if you only need CPU hotplugging enabled for suspend/resume.
+
+ This value may be overridden at boot time with the "additional_cpus"
+ kernel parameter, if CPU_HOTPLUG is enabled.
+
+config HOTPLUG_ADDITIONAL_CPUS
+ int
+ default 0 if !HOTPLUG_CPU || !HOTPLUG_DEFAULT_ADDITIONAL_CPUS
+ default -1
+
config COMPAT_VDSO
def_bool y
prompt "Compat VDSO support"
Index: linux-2.6.26.noarch/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.26.noarch.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6.26.noarch/arch/x86/kernel/smpboot.c
@@ -1318,7 +1318,7 @@ void __init native_smp_cpus_done(unsigne
cpu_clear(cpu, cpu_sibling_setup_map);
}
-static int additional_cpus __initdata = -1;
+static int additional_cpus __initdata = CONFIG_HOTPLUG_ADDITIONAL_CPUS;
static __init int setup_additional_cpus(char *s)
{
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/config-generic,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- config-generic 22 Aug 2008 18:16:26 -0000 1.115
+++ config-generic 1 Oct 2008 17:19:27 -0000 1.116
@@ -4,6 +4,7 @@
CONFIG_MMU=y
CONFIG_SMP=y
CONFIG_HOTPLUG_CPU=y
+# CONFIG_HOTPLUG_DEFAULT_ADDITIONAL_CPUS is not set
CONFIG_LOCALVERSION=""
# CONFIG_CRASH_DUMP is not set
#
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.776
retrieving revision 1.777
diff -u -r1.776 -r1.777
--- kernel.spec 29 Sep 2008 16:38:04 -0000 1.776
+++ kernel.spec 1 Oct 2008 17:19:27 -0000 1.777
@@ -595,6 +595,7 @@
Patch98: linux-2.6-x86-fix-memmap-exactmap-boot-argument.patch
Patch100: linux-2.6-x86-pci-detect-end_bus_number.patch
Patch101: linux-2.6-x86-check-for-null-irq-context.patch
+Patch102: linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch
Patch120: linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
Patch121: linux-2.6-pci-disable-aspm-on-pre-1.1-devices.patch
@@ -1086,6 +1087,8 @@
ApplyPatch linux-2.6-x86-pci-detect-end_bus_number.patch
# don't oops if there's no IRQ stack available
ApplyPatch linux-2.6-x86-check-for-null-irq-context.patch
+# add config option to disable adding CPUs after boot
+ApplyPatch linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch
# disable ASPM on devices that don't support it
ApplyPatch linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
@@ -1902,6 +1905,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Wed Oct 01 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-50
+- Add config option to disallow adding CPUs after booting.
+
* Mon Sep 29 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.5-49
- Don't oops if no IRQ stack is available (#461846)
More information about the scm-commits
mailing list