Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 22:17:29 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Julian Elischer <julian@elischer.org>
Cc:        John Baldwin <jhb@FreeBSD.org>, arch@FreeBSD.org, Alfred Perlstein <bright@mu.org>
Subject:   Re: Kernel stack size and stacking: do we have a problem ? 
Message-ID:  <2799.1008883049@critter.freebsd.dk>
In-Reply-To: Your message of "Thu, 20 Dec 2001 12:48:05 PST." <Pine.BSF.4.21.0112201244380.46573-100000@InterJet.elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

Julian, doesn't this give you an ordering issue ?

Imagine this setup

	(lots of stuff)
	      |
	   module 1
	      |
	   module 2
	      |
	   module 3

With the added information that the path through module 2 can be very
short or very long, depending on the packet contents.

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.

Now the two requests have been reordered without any of the modules
having any hint of this.

The obvious ways to fix this is to continue to queue once you queue
on a module (in other words: always queue if the queue is non-empty)


-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2799.1008883049>