From owner-freebsd-arch@FreeBSD.ORG Mon Mar 31 01:05:29 2003 Return-Path: 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 3459C37B401 for ; Mon, 31 Mar 2003 01:05:29 -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 8B04D43F93 for ; Mon, 31 Mar 2003 01:05:28 -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 h2V95Fah032538; Mon, 31 Mar 2003 01:05:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h2V95EvX032537; Mon, 31 Mar 2003 01:05:14 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Mon, 31 Mar 2003 01:05:14 -0800 From: David Schultz To: Poul-Henning Kamp Message-ID: <20030331090514.GB32360@HAL9000.homeunix.com> Mail-Followup-To: Poul-Henning Kamp , Wes Peters , Garance A Drosihn , Dan Nelson , freebsd-arch@FreeBSD.ORG References: <200303280910.32307.wes@softweyr.com> <10261.1048975354@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10261.1048975354@critter.freebsd.dk> cc: freebsd-arch@FreeBSD.ORG Subject: Re: Patch to protect process from pageout killing X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 09:05:30 -0000 Thus spake Poul-Henning Kamp : > In message <200303280910.32307.wes@softweyr.com>, Wes Peters writes: > > >I've reworked my patch to use the madvise(2) syscall, like the original > >4.x patch did. I've even documented it, in a man page of all places. > >Please see attached patch. If nobody objects, I'll commit sometime this > >weekend. > > I'm still not certain about the inheritance of this, do we want/is it > inherited ? > > Also, thinking about it, on at least a handful of machines I would > have more use for MADV_KILLMEFIRST having the exact opposite > behaviour. KILLMEFIRST is more of an advisory mechanism. See relevant discussions of SIGDANGER, priority systems, etc. These are all good ideas, but I think they belong in a domain of cooperation and altruism, whereas MADV_PROTECT is the memory equivalent of rtprio. At some level, there is generally a set of processes that should never, ever be killed, e.g. postgres, sshd, apache. So you're right that KILLMEFIRST would be useful, but MADV_PROTECT is a very nice first step.