Commit 38b272f1 authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] don't let OOM killer kill same process repeatedly

Patch from Rik van Riel <riel@imladris.surriel.com>

If a process cannot exit because it's stuck in eg.  a driver, it doesn't make
sense to have the OOM killer kill it repeatedly; that could lead to a hung
system.

Instead, kill another process if the first process we tried to kill hasn't
made any move to exit within 5 seconds.  This way we have a much better
chance of recovering the system.
parent d2177b1a
......@@ -61,6 +61,9 @@ static int badness(struct task_struct *p)
if (!p->mm)
return 0;
if (p->flags & PF_MEMDIE)
return 0;
/*
* The memory size of the process is the basis for the badness.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment