From owner-cvs-src@FreeBSD.ORG Thu Jun 19 01:27:16 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 1969937B401; Thu, 19 Jun 2003 01:27:16 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3488943F93; Thu, 19 Jun 2003 01:27:15 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h5J8REJa080349; Thu, 19 Jun 2003 01:27:14 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h5J8RE1Z080348; Thu, 19 Jun 2003 01:27:14 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 19 Jun 2003 01:27:13 -0700 From: David Schultz To: Mike Silbersack Message-ID: <20030619082713.GC79448@HAL9000.homeunix.com> Mail-Followup-To: Mike Silbersack , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200306181857.h5IIvwfY075070@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306181857.h5IIvwfY075070@repoman.freebsd.org> cc: cvs-src@FreeBSD.ORG cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_descrip.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: Thu, 19 Jun 2003 08:27:16 -0000 On Wed, Jun 18, 2003, Mike Silbersack wrote: > silby 2003/06/18 11:57:58 PDT > > FreeBSD src repository > > Modified files: > sys/kern kern_descrip.c > Log: > Reserve the last 5% of file descriptors for root use. This should allow > systems to fail more gracefully when a file descriptor exhaustion situation > occurs. > > Original patch by: David G. Andersen > PR: 45353 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=45353 Please allow me to re-make the point I believe I made when the patch was submitted. (Of course, you're welcome to ignore it.) The reserve should be a tunable constant, not a fixed percentage. The idea, as I understand, is to allow the administrator to log in and correct the problem. On a server with 50000 struct files, the reserve doesn't need to be 2000; a reserve on the order of 100 open files should be adequate for just about any system. In other words, the reserve doesn't need to scale with the size of the system. I'm glad to see that you made the keen observation that it's important to check the real UID for rootness rather than the effective UID. And thanks for subsequently adding the rate-limited ``file table full'' diagnostics.