Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 12:25:07 -0700 (PDT)
From:      John Baldwin <jhb@pike.osd.bsdi.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/alpha/alpha trap.c
Message-ID:  <200009131925.MAA44113@pike.osd.bsdi.com>
In-Reply-To: <Pine.BSF.4.21.0009130939260.86297-100000@salmon.nlsystems.com> from Doug Rabson at "Sep 13, 2000 09:42:57 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Rabson wrote:
> On Tue, 12 Sep 2000, John Baldwin wrote:
> 
> > Doug Rabson wrote:
> > > On Tue, 12 Sep 2000, Doug Rabson wrote:
> > > 
> > > > dfr         2000/09/12 15:47:10 PDT
> > > > 
> > > >   Modified files:
> > > >     sys/alpha/alpha      trap.c 
> > > >   Log:
> > > >   Merge changes from the i386 port to allow userret() to be called both
> > > >   with and without holding the Giant mutex.
> > > 
> > > With this change, my UP test box boots and appears happy. We will see if
> > > it manages to complete its 'make world'.
> > 
> > Can you turn on the Giant enter and exit's in interrupt() now?
> 
> I have done this already, mainly to increase the pressure on Giant. I
> still think that its not the right thing to do, even for SMP
> machines. Also, there is clearly a race for recursing a mutex if it can be
> recursed from an irq context since the "m->mtx_recurse++" statement could
> be interrupted.

We should make it an atomic_add_int() then to work around that for the
time being.  I agree it is probably not the right thing to do at the
moment.  Once I get ithreads working, it probably won't be needed for
device interrupts anymore, which will help some.  If we can bounce the clock
interrupt to a thread that will help as well.

Also, I should make a note about the ithreads patch.  It tries to use
device_get_nameunit() when adding interrupt handlers so that ithreads can
have useful names such as on the x86 that include the names of the devices
that use that ithread.  However, it turns out that during my testing
dev isn't initialized yet, so that device_get_nameunit() ends up dereferencing
NULL pointers.  *sigh*  In the cia pci code and the isa code I have hacked
around this by just using "pci" and "isa" for the names instead.  However,
these hacks are only in those bus drivers atm because I don't plan to have
them in the final patch, so if you are going to try out the ithreads stuff,
you will have to modify your pcibus driver to use a similar hack to that
of cia.c.

-- 

John Baldwin <jhb@bsdi.com> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009131925.MAA44113>