Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 13:29:20 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Alfred Perlstein <bright@mu.org>, arch@FreeBSD.org
Subject:   Re: Kernel stack size and stacking: do we have a problem ?
Message-ID:  <Pine.BSF.4.21.0112201327120.46573-100000@InterJet.elischer.org>
In-Reply-To: <XFMail.011220132124.jhb@FreeBSD.org>

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


On Thu, 20 Dec 2001, John Baldwin wrote:

> 
> On 20-Dec-01 Poul-Henning Kamp wrote:
> > 
> > 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)
>  
> Hmm, I was thinking that the original request would block when it queued the
> request, and would be woken up when the original request was completed by the
> worker thread.  Thus, for each producer, only one item should be in the queue
> at a time (plus any sub events it may create), but that multiple producers may
> be putting events onto the queue handled by the worker thread.

That may be true for a disk layer.. (in fact I doubt that it is true..)
but it's not true for network stuff.
In a disk layer, though, order isprobably not important.
I would doubt that the operations would be synchronous. More likely 
asynchronous as PHK suggests.


> 
> -- 
> 
> John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
> 
> 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




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