From owner-freebsd-current Thu Mar 12 13:08:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA28375 for freebsd-current-outgoing; Thu, 12 Mar 1998 13:08:34 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from shadow.worldbank.org (shadow.worldbank.org [138.220.104.78]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA28347; Thu, 12 Mar 1998 13:08:29 -0800 (PST) (envelope-from adhir@worldbank.org) Received: from localhost (adhir@localhost) by shadow.worldbank.org (8.8.8/8.8.8) with SMTP id QAA00516; Thu, 12 Mar 1998 16:01:21 -0500 (EST) (envelope-from adhir@worldbank.org) X-Authentication-Warning: shadow.worldbank.org: adhir owned process doing -bs Date: Thu, 12 Mar 1998 16:01:21 -0500 (EST) From: "Alok K. Dhir" To: Tor.Egge@idi.ntnu.no cc: root@mantar.slip.netcom.com, current@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: spkrtest locks up system In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Could this patch be related to the lockups I've been experiencing when trying to play sounds on recent -current kernels? Sound (dsp, etc) hasn't worked for at least a couple of weeks now... Thanks On Thu, 12 Mar 1998 Tor.Egge@idi.ntnu.no wrote: > > > > 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 > -------------------------------------------------------------------- \||/_ Alok K. Dhir Phone: +1.202.473.2446 oo \ R7-003, ITSMC Email: adhir@worldbank.org L_ The World Bank Group Washington, DC \/ ------------------------------------------------------------------------| "Unix _is_ user friendly - it just chooses friends selectively..." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message