From owner-cvs-src@FreeBSD.ORG Mon Jul 7 21:02:36 2003 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 5048B37B401; Mon, 7 Jul 2003 21:02:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C6343FE0; Mon, 7 Jul 2003 21:02:32 -0700 (PDT) (envelope-from silby@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6842V0U064706; Mon, 7 Jul 2003 21:02:31 -0700 (PDT) (envelope-from silby@repoman.freebsd.org) Received: (from silby@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6842VtT064702; Mon, 7 Jul 2003 21:02:31 -0700 (PDT) Message-Id: <200307080402.h6842VtT064702@repoman.freebsd.org> From: Mike Silbersack Date: Mon, 7 Jul 2003 21:02:31 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_param.c sys_pipe.c src/sys/sys pipe.h 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: Tue, 08 Jul 2003 04:02:38 -0000 silby 2003/07/07 21:02:31 PDT FreeBSD src repository Modified files: sys/kern subr_param.c sys_pipe.c sys/sys pipe.h Log: Put some concrete limits on pipe memory consumption: - Limit the total number of pipes so that we do not exhaust all vm objects in the kernel map. When this limit is reached, a ratelimited message will be printed to the console. - Put a soft limit on the amount of memory consumable by pipes. Once the limit has been reached, all new pipes will be limited to 4K in size, rather than the default of 16K. - Put a limit on the number of pages that may be used for high speed page flipping in order to reduce the amount of wired memory. Pipe writes that occur while this limit is exceeded will fall back to non-page flipping mode. The above values are auto-tuned in subr_param.c and are scaled to take into account both the size of physical memory and the size of the kernel map. These limits help to reduce the "kernel resources exhausted" panics that could be caused by opening a large number of pipes. (Pipes alone are no longer able to exhaust all resources, but other kernel memory hogs in league with pipes may still be able to do so.) PR: 53627 Ideas / comments from: hsu, tjr, dillon@apollo.backplane.com MFC after: 1 week Revision Changes Path 1.57 +29 -0 src/sys/kern/subr_param.c 1.138 +68 -17 src/sys/kern/sys_pipe.c 1.21 +11 -0 src/sys/sys/pipe.h