From owner-cvs-src Fri Mar 14 9: 9:46 2003 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 2A2EB37B401; Fri, 14 Mar 2003 09:09:44 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 952B843F75; Fri, 14 Mar 2003 09:09:42 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.8/8.12.8) with ESMTP id h2EH9Uh8007902; Fri, 14 Mar 2003 18:09:32 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: "Daniel C. Sobral" Cc: Garance A Drosihn , Juli Mallett , 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 From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 14 Mar 2003 14:03:23 -0300." <3E720B5B.8090200@tcoip.com.br> Date: Fri, 14 Mar 2003 18:09:30 +0100 Message-ID: <7901.1047661770@critter.freebsd.dk> 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 In message <3E720B5B.8090200@tcoip.com.br>, "Daniel C. Sobral" writes: >There have been three suggestions to deal with low memory problem: > >* First, one way of telling the kernel that a certain process should be >excluded from the processes that can be killed under low memory conditions. > >* Second, SIGDANGER. malloc(3) keeps a (small) cache which can be flushed on 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. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message