From owner-freebsd-current@FreeBSD.ORG Mon May 3 21:17:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0D0616A4CE; Mon, 3 May 2004 21:17:34 -0700 (PDT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D801043D53; Mon, 3 May 2004 21:17:33 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i444HL5v018013; Tue, 4 May 2004 14:17:21 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i444HHI2020020; Tue, 4 May 2004 14:17:19 +1000 Date: Tue, 4 May 2004 14:17:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Robert Watson In-Reply-To: Message-ID: <20040504134415.A8625@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: bm@malepartus.de cc: freebsd-current@FreeBSD.org cc: "M. Warner Losh" Subject: Re: sio: lots of silo overflows on Asus K8V with Moxa Smartio C104H/PCI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2004 04:17:34 -0000 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