Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2005 12:05:47 -0700 (PDT)
From:      "ALeine" <aleine@austrosearch.net>
To:        killing@multiplay.co.uk
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kernel killing processes when out of swap 
Message-ID:  <200504121905.j3CJ5ln3023047@marlena.vvi.at>

next in thread | raw e-mail | index | archive | help
killing@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
> this.
> 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.

ALeine
___________________________________________________________________
WebMail FREE http://mail.austrosearch.net 



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