From owner-cvs-src@FreeBSD.ORG Mon Aug 16 01:27:24 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEAE416A4CE; Mon, 16 Aug 2004 01:27:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B390243D1D; Mon, 16 Aug 2004 01:27:24 +0000 (GMT) (envelope-from silby@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7G1ROVP032547; Mon, 16 Aug 2004 01:27:24 GMT (envelope-from silby@repoman.freebsd.org) Received: (from silby@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7G1ROW4032546; Mon, 16 Aug 2004 01:27:24 GMT (envelope-from silby) Message-Id: <200408160127.i7G1ROW4032546@repoman.freebsd.org> From: Mike Silbersack Date: Mon, 16 Aug 2004 01:27:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern sys_pipe.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2004 01:27:25 -0000 silby 2004-08-16 01:27:24 UTC FreeBSD src repository Modified files: sys/kern sys_pipe.c Log: Major enhancements to pipe memory usage: - pipespace is now able to resize non-empty pipes; this allows for many more resizing opportunities - Backing is no longer pre-allocated for the reverse direction of pipes. This direction is rarely (if ever) used, so this cuts the amount of map space allocated to a pipe in half. - Pipe growth is now much more dynamic; a pipe will now grow when the total amount of data it contains and the size of the write are larger than the size of pipe. Previously, only individual writes greater than the size of the pipe would cause growth. - In low memory situations, pipes will now shrink during both read and write operations, where possible. Once the memory shortage ends, the growth code will cause these pipes to grow back to an appropriate size. - If the full PIPE_SIZE allocation fails when a new pipe is created, the allocation will be retried with SMALL_PIPE_SIZE. This helps to deal with the situation of a fragmented map after a low memory period has ended. - Minor documentation + code changes to support the above. In total, these changes increase the total number of pipes that can be allocated simultaneously, drastically reducing the chances that pipe allocation will fail. Performance appears unchanged due to dynamic resizing. Revision Changes Path 1.177 +136 -55 src/sys/kern/sys_pipe.c