Subject: Re: kern/25285: i386 MP panic: TLB IPI rendezvous failed (mask 1)
To: None <M.Drochner@fz-juelich.de>
From: Havard Eidnes <he@netbsd.org>
List: current-users
Date: 06/03/2004 19:36:59
----Next_Part(Thu_Jun__3_19:36:59_2004_262)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

> IPIs can get lost appearently.
> I don't fully understand how this can happen, but changing
> the code to be more conservative helped on my dual-Opteron.
>
> Could you try the i386 equivalent of the patch I appended
> to the PR database?

For your collective convenience, an equivalent patch for i386 is
attached below.  I'm presently running one SMP box with the patch,
FWIW, though it didn't trigger this problem frequently in the past.

> Would also be interesting whether this has performance
> implications.

Do you have a suspicion whether it would make matters better or worse?

Regards,

- H=E5vard

----Next_Part(Thu_Jun__3_19:36:59_2004_262)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Index: vector.S
===================================================================
RCS file: /usr/users/he/nbcvs/netbsd/src/sys/arch/i386/i386/vector.S,v
retrieving revision 1.14
diff -u -1 -0 -r1.14 vector.S
--- vector.S	20 Apr 2004 11:59:20 -0000	1.14
+++ vector.S	3 Jun 2004 17:11:01 -0000
@@ -156,30 +156,30 @@
 	pushl	$0		
 	pushl	$T_ASTFLT
 	INTRENTRY		
 IDTVEC(resume_lapic_ipi)
 	cli
 	jmp	1f
 IDTVEC(intr_lapic_ipi)
 	pushl	$0		
 	pushl	$T_ASTFLT
 	INTRENTRY		
-	movl	$0,_C_LABEL(local_apic)+LAPIC_EOI
 	movl	CPUVAR(ILEVEL),%ebx
 	cmpl	$IPL_IPI,%ebx
 	jae	2f
 1:
 	incl	CPUVAR(IDEPTH)
 	movl	$IPL_IPI,CPUVAR(ILEVEL)
         sti
 	pushl	%ebx
 	call	_C_LABEL(x86_ipi_handler)
+	movl	$0,_C_LABEL(local_apic)+LAPIC_EOI
 	jmp	_C_LABEL(Xdoreti)
 2:
 	orl	$(1 << LIR_IPI),CPUVAR(IPENDING)
 	sti
 	INTRFASTEXIT
 
 #if defined(DDB)
 IDTVEC(intrddbipi)
 1:
 	str	%ax

----Next_Part(Thu_Jun__3_19:36:59_2004_262)----