Chris Ross wrote:
The underlying hypothesis for suggesting explicitly flagging
candidates for killing is of course that it doesn't see who
exactly is misbehaving :-) Since this issue has been around for
a nummber of years, I think it's fair to assume that the OOM
killers indeed have a problem in that area.
The example I have in mind is on my machine when the daily cron run over commits causing standard daemons such as ntpd to be killed to make room. It would be preferable if the daemon was swapped out and just didn't run for minutes, or even hours if need be, but was allowed to run again once the system had settled down.
Ah, now I understand why you'd want to swap. Interesting. Now,
depending on the time if day, you have typically "interactive"
processes, like your idle desktop, turn into "non-interactive"
ones, which can then be subjected to swapping. Nice example
against static classification :-)
So, the problem breaks down into three parts:
i) When should the oom killer be invoked.
ii) How do we pick a victim process
iii) How can we deal with the process in the most useful manner
iii) may also affect i). If you're going to swap, you don't want
to wait until you're fighting for the last available page in the
system.