Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2004 11:54:11 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Peter Edwards <peter.edwards@openet-telecom.com>
Cc:        current@FreeBSD.org
Subject:   Re: Coalescing pipe allocation
Message-ID:  <Pine.NEB.3.96L.1040203115210.79056E-100000@fledge.watson.org>
In-Reply-To: <401FCCBE.2010008@openet-telecom.com>

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

On Tue, 3 Feb 2004, Peter Edwards wrote:

> I have certainly taken that at face value at least once when deciding on
> how to use (or not use) pipes.  Is this portability issue so
> ridiculously out of date that the comment in the pipe(2) manpage should
> be removed, or at least toned down? It seems silly to incur the costs of
> implementation you've mentioned and then recommend that the feature not
> be used. 

Well, I don't know so much about the portability issues, but I can say
that it seems silly to incur the costs if few applications take advantage
of the feature.  Especially if the cost can be defered until the feature
is exercised.  I have some local patches that defer all pipe buffer
allocation until a particular direction is first used, but this has some
potential downsides, including increasing the chances that a lack of
resources is discovered on first-use, rather than on allocation of the
pipe (which makes it a lot harder to write robust applications).  Another
issue to look at is keeping a pool of buffers to amortize the cost of
allocation from the pipe_map, which is something I've also started looking
at.  I haven't tried benchmarking the differences as yet. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Senior Research Scientist, McAfee Research




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040203115210.79056E-100000>