public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Readd BUG for SMP TLB IPI
@ 2003-07-09 10:49 Andi Kleen
  2003-07-09 11:27 ` Alan Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2003-07-09 10:49 UTC (permalink / raw)
  To: torvalds, linux-kernel


Readd the BUG for an spurious SMP TLB IPI.

Rationale: 

The condition is fatal and it's better to have a BUG than a hang.
The goto out code forgets to ack the IPI in the APIC. When the IPI would really arrive
at the wrong CPU it would immediately deadlock because the non-Acked IPI is retriggered.
Adding an ACK for this path is also no good, because then the SMP flusher would
need to detect this case and "retransmit" the IPI, otherwise it would hang too
in the loop waiting for other CPUs. But nobody has ever seen such a hang, so it's safe
to assume that all hardware guarantees it cannot happen.

-Andi

--- linux-2.5-amd64/arch/i386/kernel/smp.c~	2003-07-09 12:42:36.000000000 +0200
+++ linux-2.5-amd64/arch/i386/kernel/smp.c	2003-07-09 12:42:36.000000000 +0200
@@ -312,15 +312,7 @@
 	cpu = get_cpu();
 
 	if (!test_bit(cpu, &flush_cpumask))
-		goto out;
-		/* 
-		 * This was a BUG() but until someone can quote me the
-		 * line from the intel manual that guarantees an IPI to
-		 * multiple CPUs is retried _only_ on the erroring CPUs
-		 * its staying as a return
-		 *
-		 * BUG();
-		 */
+		BUG();
 		 
 	if (flush_mm == cpu_tlbstate[cpu].active_mm) {
 		if (cpu_tlbstate[cpu].state == TLBSTATE_OK) {

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-09 23:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-09 10:49 [PATCH] Readd BUG for SMP TLB IPI Andi Kleen
2003-07-09 11:27 ` Alan Cox
2003-07-09 11:41   ` Andi Kleen
2003-07-09 16:53     ` Alan Cox
2003-07-09 16:58       ` Andi Kleen
2003-07-09 17:04         ` Alan Cox
2003-07-09 17:32           ` Andi Kleen
2003-07-09 23:38             ` Alan Cox
2003-07-09 17:37           ` Compile failure 2.4.22-pre3-ac1 Midian
2003-07-09 18:10             ` Steven Cole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox