Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 17:58:50 -0700 (PDT)
From:      John Baldwin <jhb@pike.osd.bsdi.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        alpha@FreeBSD.org
Subject:   Re: Prelimiary interrupt thread patches for alpha
Message-ID:  <200009140058.RAA56657@pike.osd.bsdi.com>
In-Reply-To: <Pine.BSF.4.21.0009110036090.49106-100000@salmon.nlsystems.com> from Doug Rabson at "Sep 11, 2000 00:43:49 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Rabson wrote:
> On first reading, it looks like a good start. I have a partially written
> version which separates the interrupt source (the vector) from the
> handlers which have been registered using that vector. That would simplify
> the search for the ithread. In fact, there isn't much difference in what I
> had between the interrupt source and the ithread itself. One idea to clean
> things up would be to make the hash table entries contain the ithreads
> directly, with the handlers in a list on each ithread. I'd also like to
> re-do the hash function to avoid the modulus operation since that is very
> expensive on alpha.
> 
> I don't think this code will work properly without adding some code to
> disable the interrupt source before returning from the low-level irq
> handler. If this isn't done for at least pci interrupts, they will just
> fire again immediately which tends to cause instant stack overflow.

This is what is happening now.  My alpha is hanging during the SCSI bus
probe.  When I selectively dumped the KTR output to the console, it was
constantly scheduling the ithread for a PCI interrupt (I'm assuming it was
my isp0 controller) because the interrupt was repeatedly firing.

> One way to solve this would be to pass a couple more function pointers to
> alpha_setup_intr(), one to enable a vector and one to disable it. The irq
> handler would disable the vector and schedule the ithread. The ithread
> would handle the interrupt and re-enable the vector before sleeping.

I can go ahead and start tweaking with alpha_setup_intr() and all the
places that happen to get these setup.  However, what I don't know is what
to stick in these functions to actually enable/disable the interrupt vector.
ISA interrupts seem to be working fine, btw, so for ISA we can probably get
away with just passing NULL and not calling any functions, but we definitely
need something like this for PCI interrupts.

I've updated the alpha.ithreads.patch on my freefall webpage to work with
the latest current, btw.

> -- 
> Doug Rabson				Mail:  dfr@nlsystems.com
> Nonlinear Systems Ltd.			Phone: +44 20 8348 3944

-- 

John Baldwin <jhb@bsdi.com> -- http://www.FreeBSD.org/~jhb/
"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?200009140058.RAA56657>