From: Kirill Korotaev When oom_killer kills current there's no need to call schedule_timeout_interruptible() since task must die ASAP. Signed-Off-By: Pavel Emelianov Signed-Off-By: Kirill Korotaev Signed-off-by: Andrew Morton --- mm/oom_kill.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN mm/oom_kill.c~oom-kill-of-current-task mm/oom_kill.c --- devel/mm/oom_kill.c~oom-kill-of-current-task 2006-01-06 22:45:40.000000000 -0800 +++ devel-akpm/mm/oom_kill.c 2006-01-06 22:45:40.000000000 -0800 @@ -298,7 +298,8 @@ retry: /* * Give "p" a good chance of killing itself before we - * retry to allocate memory. + * retry to allocate memory unless "p" is current */ - schedule_timeout_interruptible(1); + if (!test_thread_flag(TIF_MEMDIE)) + schedule_timeout_interruptible(1); } _