Re: kernel killing processes when out of swap
From: David Schultz (das_at_FreeBSD.ORG)
Date: 04/12/05
- Previous message: Steven Hartland: "Re: kernel killing processes when out of swap"
- In reply to: Bruce M Simpson: "Re: kernel killing processes when out of swap"
- Next in thread: Steven Hartland: "Re: kernel killing processes when out of swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 12 Apr 2005 10:08:46 -0400 To: ALeine <aleine@austrosearch.net>, killing@multiplay.co.uk, freebsd-hackers@FreeBSD.ORG
On Tue, Apr 12, 2005, Bruce M Simpson wrote:
> On Tue, Apr 12, 2005 at 05:24:15AM -0700, ALeine wrote:
> > machine. Having a flag to tag processes as vital to prevent them from getting
> > killed (or to give them lower next-to-be-killed priority so that all non-vital
> > processes get killed first) when you run out of swap would be a useful feature,
>
> P_SYSTEM provides something like this feature, amongst others. It is used by
> init(8). However P_SYSTEM also says that process statistics should not be
> maintained, and that the signals that may be dispatched to such processes
> are restricted.
A madvise(NULL, 0, MADV_PROTECT) is the best way to tell the
kernel not to kill your process. You must be running as root
to use it.
Now that disk space is cheap, it would be even nicer if we had a
non-overcommit mode for swap, as most System V-derived systems do.
Then at least processes would get ENOMEM instead of SIGKILL in a
space shortage. I don't think this would be too hard to add,
except possibly for handling OBJT_DEFAULT objects.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Steven Hartland: "Re: kernel killing processes when out of swap"
- In reply to: Bruce M Simpson: "Re: kernel killing processes when out of swap"
- Next in thread: Steven Hartland: "Re: kernel killing processes when out of swap"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|