From: William Lee Irwin III During stress testing at Oracle to determine the maximum number of clients 2.6 can service, it was discovered that the failure mode of excessive numbers of clients was kernel deadlock. The following patch removes the check if (nr_swap_pages > 0) from out_of_memory() as this heuristic fails to detect memory exhaustion due to pinned allocations, directly causing the aforementioned deadlock. Signed-off-by: Andrew Morton --- 25-akpm/mm/oom_kill.c | 6 ------ 1 files changed, 6 deletions(-) diff -puN mm/oom_kill.c~oom-killer-fix mm/oom_kill.c --- 25/mm/oom_kill.c~oom-killer-fix Wed Jun 23 17:34:46 2004 +++ 25-akpm/mm/oom_kill.c Wed Jun 23 17:34:46 2004 @@ -230,12 +230,6 @@ void out_of_memory(void) static unsigned long first, last, count, lastkill; unsigned long now, since; - /* - * Enough swap space left? Not OOM. - */ - if (nr_swap_pages > 0) - return; - spin_lock(&oom_lock); now = jiffies; since = now - last; _