From owner-freebsd-current@FreeBSD.ORG Tue Feb 3 11:13:16 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 C27F616A4CE for ; Tue, 3 Feb 2004 11:13:16 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE8843D45 for ; Tue, 3 Feb 2004 11:13:15 -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 i13JAWUd081843; Tue, 3 Feb 2004 14:10:32 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i13JAWrZ081840; Tue, 3 Feb 2004 14:10:32 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 3 Feb 2004 14:10:32 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Matthew Dillon In-Reply-To: <200402031908.i13J8BAP003708@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Dag-Erling =?iso-8859-1?q?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 19:13:16 -0000 On Tue, 3 Feb 2004, Matthew Dillon wrote: > :... > :Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > :robert@fledge.watson.org Senior Research Scientist, McAfee Research > > It seems to me that realizing the lion's share of the benefit requires > only that you cache the KVM reservation for a pipe buffer, and that > you perhaps separately cache pipe meta data structures. I think > you would only get a smidgen more performance by caching the entire > pipe pair, so it seems a bit overkill to do that. By my quick read > it > looks like it would be trivial to create a small per-cpu (UMA based > for > you guys, globaldata based for me) cache. A hysteresis of 4 ought > to > be sufficient. Sounds like we agree (see earlier e-mails). However, I wanted to get the structural change to combine pipes into a single object done first, and settled. However, the current pipe model allows for a small number of "big pipes" and a larger number of "small pipes", with a fall-back from big to small pipes when you run out of big pipes (pretty quickly if you have a parallel build going on). Deferring the buffer allocation until it's needed helps conserve big pipes for where they are actually used, which will give you a benefit beyond amortizing the cost of buffer allocation. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research