From owner-freebsd-arch Thu Dec 20 14: 0:23 2001 Delivered-To: freebsd-arch@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 0E63B37B417; Thu, 20 Dec 2001 14:00:18 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20011220220017.NSBD20122.rwcrmhc53.attbi.com@InterJet.elischer.org>; Thu, 20 Dec 2001 22:00:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA53100; Thu, 20 Dec 2001 13:56:43 -0800 (PST) Date: Thu, 20 Dec 2001 13:56:42 -0800 (PST) From: Julian Elischer To: Poul-Henning Kamp Cc: John Baldwin , arch@FreeBSD.org, Alfred Perlstein Subject: Re: Kernel stack size and stacking: do we have a problem ? In-Reply-To: <3481.1008884453@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 20 Dec 2001, Poul-Henning Kamp wrote: > In message , Ju > lian Elischer writes: > >> > >> Now, module 1 sends a request down through module 2 which takes the > >> long path and consequently ends up being queued a module 3. We > >> unwind/return back up through module 2 and module 1 issues another > >> request which happens to take the short path through module 2 and > >> consequently directly calls into module 3. > > > >NO, because once an item is queued, all requests will queue behind it > >until the queue is drained again. > > > >What may happen in fact is that packet 2 will be queued and packet 1 > >dequeued and processed, followed by packet 2 being dequeued and processed. > >packet 3 may now proceed straight through.. > > Ahh, but now we hit the next problem: For stupid congestion reasons > we have N requests queued, and then we happen to come around with N+1 > while in an interrupt context and it gets to do all the work... > > We wouldn't want subject our interrupt contexts to risk that, would we ? That's why I suggest that 'real' devices that run off interrupts set the "should queue and leave" flag before passing the packet to the next layer. It is conceivable that you could have a limit as to how many packet/module processings you allow a single call to the netgraph code to do. Interrupts could set it to '6' or something which would allow the "average" packet to be processed completely. I know where this would go and it would be easy but I already have the "queue and return" flag that I use.. (The flag could be replaced by the number, set to '0') :-) > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message