From owner-cvs-src Fri Mar 14 9:31:59 2003 Delivered-To: cvs-src@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id AD3AD37B405; Fri, 14 Mar 2003 09:31:56 -0800 (PST) Date: Fri, 14 Mar 2003 11:31:56 -0600 From: Juli Mallett To: Poul-Henning Kamp Cc: "Daniel C. Sobral" , Garance A Drosihn , Eivind Eklund , Mike Silbersack , David Schultz , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm ... SIGDANGER Message-ID: <20030314113156.A10909@FreeBSD.org> References: <3E720B5B.8090200@tcoip.com.br> <7901.1047661770@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <7901.1047661770@critter.freebsd.dk>; from phk@phk.freebsd.dk on Fri, Mar 14, 2003 at 06:09:30PM +0100 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-Negacore: Yes X-Title: Code Maven Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Poul-Henning Kamp [ Data: 2003-03-14 ] [ Subjecte: Re: cvs commit: src/sys/vm ... SIGDANGER ] > >* Third, a sysctl to prevent overcommitting. With this on, memory would > >be always immediatly allocated, instead of on-demand. With this, no > >application would ever be killed. Either it aborted because it couldn't > >allocate more memory, or it didn't. Since this can lock out users from a > >machine, some of those that implemented this had a sort of reserve for > >an interactive root process (which could still get exhausted, but whatever). > > * Fourth: A cheap syscall or sysctl which can be used to get a real-time > qualified answer to the simple question: Is the system short of RAM ? > > Many programs (directly or implicitly through the use of malloc(3)) > can adapt their behaviour, but lack the means to when to do that. I'd love to see this, and I imagine adding something just enough to facilitate 'if (system_is_swapping)' might be fairly easy. Do you have a diff? -- juli mallett. email: jmallett@freebsd.org; aim: bsdflata; efnet: juli; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message