kernel killing processes when out of swap
aleine at austrosearch.net
Tue Apr 12 12:05:25 PDT 2005
killing at multiplay.co.uk wrote:
> That makes sense. Me trying to connect to see what was going
> on would hence cause sshd to be killed ( not good ).
> It would seem that we could do with doing something to prevent
> We have had a few suggestions so far.
> 1. Using madvise, requires code changes per app
> 2. Using a sysctl to name processes which shouldn't be killed.
> 3. Changing how the choice of process to kill is made.
> I don't like the idea of having to make code changes so would
> vote against #1. #3 I would imagine could be quite complex
> and error fraught so #2 seems like the best option so far.
> What do others think? Go with Marc's idea?
I would go with #3 and add a new process flag like P_KILLLAST and
then update vm_pageout_scan() to honour that flag and make sure
to kill processes without that flag first before moving to processes
which have that flag set. It would require minimum changes and you
would only need a way to set this flag on a process. No change in
existing applications would be required because they would be
oblivious to this feature. IMHO this would be preferable to having
something like SIGDANGER where every program has to have a special
signal handler in order to benefit from this feature.
WebMail FREE http://mail.austrosearch.net
More information about the freebsd-hackers