From owner-freebsd-arch Mon Mar 24 23:53:52 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E17D37B401 for ; Mon, 24 Mar 2003 23:53:48 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75FCD43F85 for ; Mon, 24 Mar 2003 23:53:47 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h2P7rhah005535; Mon, 24 Mar 2003 23:53:43 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h2P7rgQl005534; Mon, 24 Mar 2003 23:53:42 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Mon, 24 Mar 2003 23:53:42 -0800 From: David Schultz To: Garance A Drosihn Cc: Dan Nelson , Poul-Henning Kamp , Wes Peters , freebsd-arch@FreeBSD.ORG Subject: Re: Patch to protect process from pageout killing Message-ID: <20030325075342.GA5450@HAL9000.homeunix.com> Mail-Followup-To: Garance A Drosihn , Dan Nelson , Poul-Henning Kamp , Wes Peters , freebsd-arch@FreeBSD.ORG References: <200303240823.48262.wes@softweyr.com> <7019.1048523782@critter.freebsd.dk> <20030324213519.GA63147@dan.emsphone.com> <20030325012844.GB4406@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, hits=-19.6 required=5.0 tests=AWL,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Garance A Drosihn : > At 5:28 PM -0800 3/24/03, David Schultz wrote: > > Second, it is only marginally useful to go as far as specifying > >priorities and quotas and such on process killability. Most of > >the time, people can divide the processes on thier system into > >two categories: critical and killable. > > While that's probably true "most of the time", I think we'd want to > encourage three categories. critical, less-critical (killable), > and kill-me-first. That's what SIGDANGER provides, and in some > situations that third category is very desirable. Yes, I think the SIGDANGER idea makes sense. Essentially what you'd want is a higher threshhold above the ``red alert---start killing things'' threshhold where you can do smart things like send SIGDANGERs without worrying about running completely out of memory. But I'm trying to impress on people that SIGDANGER is orthogonal to what Wes is trying to do, before the whole thing gets bogged down in discussions again and nothing ever happens. Here's an example of what I mean in verbose pseudocode with fudged constants: if (free VM < 64 pages) { /* This is the part Wes is working on. */ kill big processes EXCEPT the ones that are so important that there's no point in running the system without them; } else if (free VM < 256 pages) { /* * It takes additional memory to do this, but we're * hoping some processes will cooperate and the * shortage will go away. */ start warning processes with SIGDANGER; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message