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

Alpha patch for "panic: remrunqueue", testing needed



The diff below tries to fix a particular panic on the alpha machines.
Since the panic seem intermittent, it needs much wider testing than I
have been able to obtain so far.

This patch tries to fix the "panic: remrunqueue".  After applying this
patch, and having your machine up and running for a few days, please
let me know (e-mail).  If you panic, please also let me know that,
including at the very least a panic message, and a quick traceback of
where it panic'd.

After applying this patch, you'll need to recompile your kernel and
re-boot with the new kernel.

--Toby.

Index: locore.s
===================================================================
RCS file: /cvs/src/sys/arch/alpha/alpha/locore.s,v
retrieving revision 1.26
diff -u -r1.26 locore.s
--- locore.s	3 Jul 2004 19:22:57 -0000	1.26
+++ locore.s	9 Dec 2004 14:41:17 -0000
@@ -828,6 +828,7 @@
 	sll	t0, t2, t0
 	xor	t3, t0, t3			/* clear bit in whichqs */
 	stl	t3, whichqs
+	mb
 
 5:
 	mov	t4, s2				/* save new proc */
Index: machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/alpha/alpha/machdep.c,v
retrieving revision 1.90
diff -u -r1.90 machdep.c
--- machdep.c	2 Nov 2004 21:20:56 -0000	1.90
+++ machdep.c	9 Dec 2004 14:41:17 -0000
@@ -1941,6 +1941,7 @@
 
 	bit = p->p_priority >> 2;
 	sched_whichqs |= (1 << bit);
+	alpha_mb();
 	p->p_forw = (struct proc *)&sched_qs[bit];
 	p->p_back = sched_qs[bit].ph_rlink;
 	p->p_back->p_forw = p;
@@ -1966,8 +1967,10 @@
 	p->p_forw->p_back = p->p_back;
 	p->p_back = NULL;	/* for firewall checking. */
 
-	if ((struct proc *)&sched_qs[bit] == sched_qs[bit].ph_link)
+	if ((struct proc *)&sched_qs[bit] == sched_qs[bit].ph_link) {
 		sched_whichqs &= ~(1 << bit);
+		alpha_mb();
+	}
 }
 
 /*



Visit your host, monkey.org