+ cpu_relax-smpbootc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     cpu_relax(): smpboot.c

has been added to the -mm tree.  Its filename is

     cpu_relax-smpbootc.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: cpu_relax(): smpboot.c
From: Andreas Mohr <andi@xxxxxxxxxxxxxxxxxxxxxxx>


Add cpu_relax() to various smpboot.c init loops.

Signed-off-by: Andreas Mohr <andi@xxxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/smpboot.c |   26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff -puN arch/i386/kernel/smpboot.c~cpu_relax-smpbootc arch/i386/kernel/smpboot.c
--- a/arch/i386/kernel/smpboot.c~cpu_relax-smpbootc
+++ a/arch/i386/kernel/smpboot.c
@@ -251,8 +251,10 @@ static void __init synchronize_tsc_bp (v
 		/*
 		 * all APs synchronize but they loop on '== num_cpus'
 		 */
-		while (atomic_read(&tsc_count_start) != num_booting_cpus()-1)
+		while (atomic_read(&tsc_count_start) != num_booting_cpus()-1) {
+			cpu_relax();
 			mb();
+		}
 		atomic_set(&tsc_count_stop, 0);
 		wmb();
 		/*
@@ -270,8 +272,10 @@ static void __init synchronize_tsc_bp (v
 		/*
 		 * Wait for all APs to leave the synchronization point:
 		 */
-		while (atomic_read(&tsc_count_stop) != num_booting_cpus()-1)
+		while (atomic_read(&tsc_count_stop) != num_booting_cpus()-1) {
+			cpu_relax();
 			mb();
+		}
 		atomic_set(&tsc_count_start, 0);
 		wmb();
 		atomic_inc(&tsc_count_stop);
@@ -328,19 +332,27 @@ static void __init synchronize_tsc_ap (v
 	 * this gets called, so we first wait for the BP to
 	 * finish SMP initialization:
 	 */
-	while (!atomic_read(&tsc_start_flag)) mb();
+	while (!atomic_read(&tsc_start_flag)) {
+		cpu_relax();
+		mb();
+	}
 
 	for (i = 0; i < NR_LOOPS; i++) {
 		atomic_inc(&tsc_count_start);
-		while (atomic_read(&tsc_count_start) != num_booting_cpus())
+		while (atomic_read(&tsc_count_start) != num_booting_cpus()) {
+			cpu_relax();
 			mb();
+		}
 
 		rdtscll(tsc_values[smp_processor_id()]);
 		if (i == NR_LOOPS-1)
 			write_tsc(0, 0);
 
 		atomic_inc(&tsc_count_stop);
-		while (atomic_read(&tsc_count_stop) != num_booting_cpus()) mb();
+		while (atomic_read(&tsc_count_stop) != num_booting_cpus()) {
+			cpu_relax();
+			mb();
+		}
 	}
 }
 #undef NR_LOOPS
@@ -1441,8 +1453,10 @@ int __devinit __cpu_up(unsigned int cpu)
 	per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
 	/* Unleash the CPU! */
 	cpu_set(cpu, smp_commenced_mask);
-	while (!cpu_isset(cpu, cpu_online_map))
+	while (!cpu_isset(cpu, cpu_online_map)) {
+		cpu_relax();
 		mb();
+	}
 	return 0;
 }
 
_

Patches currently in -mm which might be from andi@xxxxxxxxxxxxxxxxxxxxxxx are

git-acpi.patch
git-input.patch
ni5010-netcard-cleanup.patch
acx1xx-wireless-driver.patch
i386-apmc-optimization.patch
x86-make-using_apic_timer-__read_mostly.patch
x86-cyrix-code-config_pci-fix--add-__initdata.patch
x86-constify-some-parts-of-arch-i386-kernel-cpu.patch
x86-make-i387-mxcsr_feature_mask-__read_mostly.patch
x86-make-acpi-errata-__read_mostly.patch
x86-constify-arch-i386-pci-irqc.patch
x86-use-proper-defines-for-i8259a-i-o.patch
cpu_relax-smpbootc.patch
cpu_relax-use-in-acpi-lock.patch
cpu_relax-ptracec-coding-style-fix.patch
x86-powerpc-make-hardirq_ctx-and-softirq_ctx-__read_mostly.patch
make-noirqdebug-irqfixup-__read_mostly-add-unlikely.patch
make-debug_mutex_on-__read_mostly.patch
constify-parts-of-kernel-power.patch
constify-libcrc32c-table.patch
make-pmtmr_ioport-__read_mostly.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux