Date: Tue, 12 May 1998 02:11:23 -0500 (EST) From: "John S. Dyson" <dyson@FreeBSD.ORG> To: Tor.Egge@idi.ntnu.no Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/6587: SMP idle cpl breaks signal forwarding Message-ID: <199805120711.CAA16723@dyson.iquest.net> In-Reply-To: <199805112130.OAA26024@freefall.freebsd.org> from Tor Egge at "May 11, 98 02:30:01 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
This fix really helps things... Tor, are you willing to commit this, or do you want me to? I suggest an XXX marking for the code, but it makes our SMP code much more pleasant to use. Let me know what you want to do!!! Tor Egge said: > The following reply was made to PR kern/6587; it has been noted by GNATS. > > From: Tor Egge <Tor.Egge@idi.ntnu.no> > To: will@iki.fi > Cc: freebsd-gnats-submit@FreeBSD.ORG > Subject: Re: kern/6587: SMP idle cpl breaks signal forwarding > Date: Mon, 11 May 1998 23:27:46 +0200 > > Having a shared AST flag in an SMP configuration is wrong. > This is one of the bad side effects. > > Appended is an attempt at a workaround. Consider it my submission to > a kludge stacking contest. > > - Tor Egge > > Index: swtch.s > =================================================================== > RCS file: /home/ncvs/src/sys/i386/i386/swtch.s,v > retrieving revision 1.71 > diff -u -r1.71 swtch.s > --- swtch.s 1998/04/06 15:44:31 1.71 > +++ swtch.s 1998/05/11 20:46:13 > @@ -49,6 +49,8 @@ > #include <machine/pmap.h> > #include <machine/apic.h> > #include <machine/smptests.h> /** GRAB_LOPRIO */ > +#include <machine/ipl.h> > +#include <machine/lock.h> > #endif /* SMP */ > > #include "assym.s" > @@ -308,6 +310,10 @@ > * > * XXX: we had damn well better be sure we had it before doing this! > */ > + CPL_LOCK > + andl $~SWI_AST_MASK, _ipending > + movl $0, _cpl /* Allow ASTs on other CPU */ > + CPL_UNLOCK > movl $FREE_LOCK, %eax > movl %eax, _mp_lock > > @@ -357,16 +363,20 @@ > jmp idle_loop > > 3: > -#ifdef SMP > movl $LOPRIO_LEVEL, lapic_tpr /* arbitrate for INTs */ > -#endif > call _get_mplock > + CPL_LOCK > + movl $SWI_AST_MASK, _cpl /* Disallow ASTs on other CPU */ > + CPL_UNLOCK > cmpl $0,_whichrtqs /* real-time queue */ > CROSSJUMP(jne, sw1a, je) > cmpl $0,_whichqs /* normal queue */ > CROSSJUMP(jne, nortqr, je) > cmpl $0,_whichidqs /* 'idle' queue */ > CROSSJUMP(jne, idqr, je) > + CPL_LOCK > + movl $0, _cpl /* Allow ASTs on other CPU */ > + CPL_UNLOCK > call _rel_mplock > jmp idle_loop > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-bugs" in the body of the message > -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805120711.CAA16723>