Date: Wed, 13 Sep 2000 21:24:58 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: John Baldwin <jhb@pike.osd.bsdi.com> Cc: alpha@FreeBSD.ORG Subject: Re: cvs commit: src/sys/alpha/alpha trap.c Message-ID: <Pine.BSF.4.21.0009132122340.86297-100000@salmon.nlsystems.com> In-Reply-To: <200009131925.MAA44113@pike.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Sep 2000, John Baldwin wrote: > 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. For device interrupts, the ithread code will handle taking Giant as appropriate for non-MP-safe drivers. For clock, we need to aim at an MP-safe hardclock with softclock handled by the SWI thread. That should remove all need to take non-spin mutexes in interrupt(). > > 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. That sounds odd. The device_get_nameunit() should work the same for both x86 and alpha. I'll investigate that and see if I can come up with something cleaner. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8348 3944 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?Pine.BSF.4.21.0009132122340.86297-100000>