From owner-freebsd-net Fri Oct 18 14: 5:37 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61BDE37B401 for ; Fri, 18 Oct 2002 14:05:36 -0700 (PDT) Received: from carp.icir.org (carp.icir.org [192.150.187.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7AB443EA9 for ; Fri, 18 Oct 2002 14:05:35 -0700 (PDT) (envelope-from rizzo@carp.icir.org) Received: from carp.icir.org (localhost [127.0.0.1]) by carp.icir.org (8.12.3/8.12.3) with ESMTP id g9IL5YpJ084818; Fri, 18 Oct 2002 14:05:34 -0700 (PDT) (envelope-from rizzo@carp.icir.org) Received: (from rizzo@localhost) by carp.icir.org (8.12.3/8.12.3/Submit) id g9IL5YSo084817; Fri, 18 Oct 2002 14:05:34 -0700 (PDT) (envelope-from rizzo) Date: Fri, 18 Oct 2002 14:05:34 -0700 From: Luigi Rizzo To: Petri Helenius Cc: Jim McGrath , Lars Eggert , freebsd-net@FreeBSD.ORG Subject: Re: ENOBUFS Message-ID: <20021018140534.A84731@carp.icir.org> References: <00b001c276ba$1533dbf0$3500080a@PHE> <20021018103825.B82982@carp.icir.org> <017201c276e8$58e4b8f0$3500080a@PHE> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <017201c276e8$58e4b8f0$3500080a@PHE>; from pete@he.iki.fi on Fri, Oct 18, 2002 at 11:53:00PM +0300 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Oct 18, 2002 at 11:53:00PM +0300, Petri Helenius wrote: > > In special cases, the error induced by having interrupts blocked > > causes errors which are much larger than polling alone. > > Which conditions block interrupts for longer than, say, a millisecond? changes in link status in several ethernet drivers will cause their interrupt service routine (ISR) to loop polling for some event. A similar thing used to happen in the xl driver when fetching statistics, once per second (hopefully fixed now). Even in "normal" condition, the ISR for a network card has to loop around the status bit until no interrupts are pending, and because (typically) the receive ring is replenished while you process it, and packets come in without explicitly requesting them, there is no upper bound on how long you will loop. I wouldn't be surprised if there were other drivers doing busy-wait cycles in the interrupt service routine, because sometimes the driver detects an error condition and calls some generic routine to reinitialize the hardware, but that routine has been written for use at attach time, not at runtime. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message