Date: Thu, 12 Mar 1998 18:53:42 +0100 From: Tor Egge <Tor.Egge@idi.ntnu.no> To: root@mantar.slip.netcom.com Cc: current@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: spkrtest locks up system Message-ID: <199803121753.SAA05731@pat.idi.ntnu.no> In-Reply-To: Your message of "Wed, 11 Mar 1998 18:31:52 -0800 (PST)" References: <Pine.BSF.3.96.980311181947.343A-100000@mantar.slip.netcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On a current SMP system when I run spkrtest the system locks up.
> On a kernel built around the 26th of Feb no problem. I have a old version
> of spkrtest v1.0 by Eric S. Raymond (Feb 1990) that I use as sort of
> a backup alarm clock. I was wondering why for the past couple of weeks
> I'd wake up and the machine would be locked up. The current graphical
> version does the same thing. I have no sound card installed. One time
> it dropped into the debugger , now it just locks up. There was something
> about _mplock if i remember right. There was alot of changes to current
> around the end of Feb. (SMP and locking) and I'm not sure which is causing
> the problem. Sorry I can't be of more help.
> Manfred
The following patch might be appropiate.
Without this patch, the kernel can deadlock or panic when attempting
to enter a critical region protected by disable_intr()/enable_intr(),
since the mpintr_lock might be held by the last cpu having prezeroed
a page.
Index: sys/i386/i386/vm_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.101
diff -u -r1.101 vm_machdep.c
--- vm_machdep.c 1998/02/25 03:56:09 1.101
+++ vm_machdep.c 1998/03/08 06:00:49
@@ -950,7 +967,7 @@
if (try_mplock()) {
#endif
s = splvm();
- enable_intr();
+ __asm __volatile("sti" : : : "memory");
m = vm_page_list_find(PQ_FREE, free_rover);
if (m != NULL) {
--(*vm_page_queues[m->queue].lcnt);
@@ -973,7 +990,7 @@
++cnt_prezero;
}
splx(s);
- disable_intr();
+ __asm __volatile("cli" : : : "memory");
#ifdef SMP
rel_mplock();
return (1);
- Tor Egge
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803121753.SAA05731>
