From owner-freebsd-hackers Thu May 9 18:43:43 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id 0A13337B40A for ; Thu, 9 May 2002 18:43:38 -0700 (PDT) Received: from pool0127.cvx21-bradley.dialup.earthlink.net ([209.179.192.127] helo=mindspring.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 175zRL-0005A5-00; Thu, 09 May 2002 18:43:23 -0700 Message-ID: <3CDB2593.43E20459@mindspring.com> Date: Thu, 09 May 2002 18:42:43 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Peter Wemm Cc: Josef Karthauser , hackers@FreeBSD.ORG Subject: Re: Soft interrupts References: <20020510003901.085A7380A@overcee.wemm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Peter Wemm wrote: > 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). I'll second the softint stuff being a real performance pig. I answered your question, but if I was more careful, I should have spoken to the problem you seemed to be trying to solve, like Peter did. Even if you are looking at the TCP/IP stack itself, running the processing to completion at hardware interrupt time saves you a lot, including the latencey between the splx/netisr run (I meant it each time I discussed LRP on the list). IMO, the USB processing isn't performance critical in itself, but the more things that get jammed into softint processing, and the more things you register with netisr_register() (or whatever), the higher the latency. So just jamming something in there to make it look like NetBSD, if it isn't really, really important to maintain interface compatability for some reason, could hurt other users who have USB in the hardware (in theory, USB should be ripped out for rack-mount and server stuff, for the most part, but not every user builds a use-specfic kernel). For -current, you probably want to process to completion in the uhci/ohci thread, rather than delaying it as upper/lower like the NetBSD code tries to do. Are you running -current, or are you running a 4.x? It's really hard to tell, when you post on -hackers instead of -stable or -current... -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message