From owner-freebsd-alpha Wed Sep 13 17:59: 3 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id DA29437B422 for ; Wed, 13 Sep 2000 17:59:00 -0700 (PDT) Received: (from jhb@localhost) by pike.osd.bsdi.com (8.9.3/8.9.3) id RAA56657; Wed, 13 Sep 2000 17:58:50 -0700 (PDT) (envelope-from jhb) From: John Baldwin Message-Id: <200009140058.RAA56657@pike.osd.bsdi.com> Subject: Re: Prelimiary interrupt thread patches for alpha In-Reply-To: from Doug Rabson at "Sep 11, 2000 00:43:49 am" To: Doug Rabson Date: Wed, 13 Sep 2000 17:58:50 -0700 (PDT) Cc: alpha@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 -- 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