Re: Coalescing pipe allocation

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Tue, 3 Feb 2004 11:54:11 -0500 (EST)
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_at_fledge.watson.org      Senior Research Scientist, McAfee Research
Received on Tue Feb 03 2004 - 07:56:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:41 UTC