Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Mar 1998 16:01:21 -0500 (EST)
From:      "Alok K. Dhir" <adhir@worldbank.org>
To:        Tor.Egge@idi.ntnu.no
Cc:        root@mantar.slip.netcom.com, current@FreeBSD.ORG, smp@FreeBSD.ORG
Subject:   Re: spkrtest locks up system
Message-ID:  <Pine.NEB.3.96.980312160013.498A-100000@shadow.worldbank.org>
In-Reply-To: <A43E4B745607514F852565C500631E25.0063D828852565C5@worldbank.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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-smp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.980312160013.498A-100000>