From owner-freebsd-current@FreeBSD.ORG Tue Feb 3 08:56:59 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02C6516A4CE for ; Tue, 3 Feb 2004 08:56:58 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 067FA43D31 for ; Tue, 3 Feb 2004 08:56:53 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i13GsBUd079567; Tue, 3 Feb 2004 11:54:11 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i13GsBlX079564; Tue, 3 Feb 2004 11:54:11 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 3 Feb 2004 11:54:11 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Peter Edwards In-Reply-To: <401FCCBE.2010008@openet-telecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= cc: current@FreeBSD.org Subject: Re: Coalescing pipe allocation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 16:56:59 -0000 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