Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 01:05:14 -0800
From:      David Schultz <das@FreeBSD.ORG>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Patch to protect process from pageout killing
Message-ID:  <20030331090514.GB32360@HAL9000.homeunix.com>
In-Reply-To: <10261.1048975354@critter.freebsd.dk>
References:  <200303280910.32307.wes@softweyr.com> <10261.1048975354@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Poul-Henning Kamp <phk@phk.freebsd.dk>:
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030331090514.GB32360>