rpms/kernel/F-8 linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch, NONE, 1.1 kernel.spec, 1.545, 1.546

Chuck Ebbert cebbert at fedoraproject.org
Thu Oct 9 11:45:53 UTC 2008


Author: cebbert

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

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.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: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.545
retrieving revision 1.546
diff -u -r1.545 -r1.546
--- kernel.spec	9 Oct 2008 09:43:32 -0000	1.545
+++ kernel.spec	9 Oct 2008 11:45:22 -0000	1.546
@@ -589,6 +589,7 @@
 Patch97: linux-2.6-x86-hpet-04-workaround-sb700-bios.patch
 Patch99: linux-2.6-x86-intel-msr-backport.patch
 Patch100: linux-2.6-x86-pci-detect-end_bus_number.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
@@ -1031,6 +1032,8 @@
 ApplyPatch linux-2.6-x86-intel-msr-backport.patch
 # fix e820 reservation checking
 ApplyPatch linux-2.6-x86-pci-detect-end_bus_number.patch
+# switch to UP mode with only 1 CPU present at boot
+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
@@ -1845,6 +1848,9 @@
 
 
 %changelog
+* Thu Oct 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-36
+- 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-35
 - 2.6.26.6
   Dropped patches:




More information about the fedora-extras-commits mailing list