From owner-freebsd-hackers Thu May 9 17:39:13 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wemm.org (12-232-135-171.client.attbi.com [12.232.135.171]) by hub.freebsd.org (Postfix) with ESMTP id 665E237B405 for ; Thu, 9 May 2002 17:39:01 -0700 (PDT) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (8.11.6/8.11.6) with ESMTP id g4A0d1439515 for ; Thu, 9 May 2002 17:39:01 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 085A7380A; Thu, 9 May 2002 17:39:01 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Josef Karthauser Cc: hackers@FreeBSD.ORG Subject: Re: Soft interrupts In-Reply-To: <20020509223740.GC8889@genius.tao.org.uk> Date: Thu, 09 May 2002 17:39:01 -0700 From: Peter Wemm Message-Id: <20020510003901.085A7380A@overcee.wemm.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Josef Karthauser wrote: > Do we have soft interrupts? > > Here's a bit of code from the NetBSD usb stack, and I'm trying to work > out what it would be in FreeBSDland. > > sc->sc_bus->soft = softintr_establish(IPL_SOFTNET, > sc->sc_bus->methods->soft_intr, sc->sc_bus); > if (sc->sc_bus->soft == NULL) { > printf("%s: can't register softintr\n", USBDEVNAME(sc->sc_dev )); > sc->sc_dying = 1; > USB_ATTACH_ERROR_RETURN; > } > > Can someone point me to a man page please? > > Joe You probably want to have a good look at usb_ethersubr.c - it does this sort of thing already, but for different reasons. On FreeBSD, the usb hardware interrupts ran (pre-SMPng) as bio, not net. All of the assumptions, problems and workarounds for this from pre-SMPng are now invalid or irrelevant. usb_ethersubr.c can be gutted right down now since splnet and splbio are irrelevant. The problems that NetBSD has to deal with are no longer the same for us. The softint stuff is probably harmful for us because it would mean an *extra* context switch. (from the uhci/ohci ithread to the swinet ithread). Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message