rpms/kernel/F-9 linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch, NONE, 1.1 config-generic, 1.117, 1.118 kernel.spec, 1.786, 1.787 linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch, 1.1, NONE

Chuck Ebbert cebbert at fedoraproject.org
Thu Oct 9 11:37:18 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7718

Modified Files:
	config-generic kernel.spec 
Added Files:
	linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch 
Removed Files:
	linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch 
Log Message:
x86: switch to UP mode when only one CPU is present at boot time

linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch:

--- NEW FILE linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch ---
From: Thomas Gleixner <tglx at linutronix.de>
Date: Sun, 5 Oct 2008 14:52:24 +0000 (+0200)
Subject: x86: improve UP kernel when CPU-hotplug and SMP is enabled
X-Git-Tag: tip-history-2008-10-08_08.31_Wed~26^2~5
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fx86%2Flinux-2.6-tip.git;a=commitdiff_plain;h=683fa0c76b4245a85cc0601a0cab6459cad27fe8

x86: improve UP kernel when CPU-hotplug and SMP is enabled

num_possible_cpus() can be > 1 when disabled CPUs have been accounted.

Disabled CPUs are not in the cpu_present_map, so we can use
num_present_cpus() as a safe indicator to switch to UP alternatives.

Reported-by: Chuck Ebbert <cebbert at redhat.com>
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Cc: <stable at kernel.org>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index fb04e49..a84ac7b 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -444,7 +444,7 @@ void __init alternative_instructions(void)
 					    _text, _etext);
 
 		/* Only switch to UP mode if we don't immediately boot others */
-		if (num_possible_cpus() == 1 || setup_max_cpus <= 1)
+		if (num_present_cpus() == 1 || setup_max_cpus <= 1)
 			alternatives_smp_switch(0);
 	}
 #endif


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/config-generic,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- config-generic	4 Oct 2008 01:35:25 -0000	1.117
+++ config-generic	9 Oct 2008 11:36:47 -0000	1.118
@@ -4,7 +4,6 @@
 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.786
retrieving revision 1.787
diff -u -r1.786 -r1.787
--- kernel.spec	9 Oct 2008 09:50:49 -0000	1.786
+++ kernel.spec	9 Oct 2008 11:36:47 -0000	1.787
@@ -607,7 +607,7 @@
 Patch97: linux-2.6-x86-hpet-04-workaround-sb700-bios.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
+Patch102: linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.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
@@ -1081,7 +1081,7 @@
 # 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
+ApplyPatch linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch
 
 # disable ASPM on devices that don't support it
 ApplyPatch linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
@@ -1892,6 +1892,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
+* Thu Oct 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-60
+- x86: switch to UP mode when only one CPU is present at boot time
+
 * Thu Oct 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-59
 - 2.6.26.6
 


--- linux-2.6-x86-cpu-hotplug-allow-setting-additional-cpus.patch DELETED ---




More information about the scm-commits mailing list