Date: Tue, 4 May 2004 14:17:16 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Robert Watson <rwatson@FreeBSD.org> Cc: "M. Warner Losh" <imp@bsdimp.com> Subject: Re: sio: lots of silo overflows on Asus K8V with Moxa Smartio C104H/PCI Message-ID: <20040504134415.A8625@gamplex.bde.org> In-Reply-To: <Pine.NEB.3.96L.1040503130429.95554B-100000@fledge.watson.org> References: <Pine.NEB.3.96L.1040503130429.95554B-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 May 2004, Robert Watson wrote: > On Mon, 3 May 2004, Bruce Evans wrote: > > Unsafe. SWIs are wrapped by Giant unless they are created using > > swi_add(... INTR_MPSAFE ...). There are 26 calls to swi_add() in the > > tree, and the slow progress of Giant removal is shown by only 3 of > > these using INTR_MPSAFE. The ones in sio are not in the 3. The 3 > > are all just for multiplexors that push down deciding whether to use > > Giant to lower layers: > > Actually, it's a little more complex than that: most of the callers if > swi_add() with INTR_MPSAFE are actually via bus_setup_intr() which accepts > similar flags. You'll find that a much larger number of interrupts are > capable of running mpsafe if you search for that. Also, unless Um, bus_setup_intr() is for hardware interrupts. It doesn't call swi_add(), since swi_add() is for software interrupts. Hardware interrupts were not being discussed here. You may be thinging of ithread_add_handler() which is a common core for swi_add() and bus_setup_intr(). BTW, there are about 34 broken drivers that use BUS_SETUP_INTR(device_get_parent(...), ...) instead of bus_setup_interrupt(). This just evades printing of the FAST/GIANT-LOCKED/MPSAFE boot message. BUS_SETUP_INTR() seems to be needed in only 10 files. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040504134415.A8625>