aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorKirill Korotaev <dev@sw.ru>2006-01-08 04:01:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:12:45 -0500
commit2f659f462d2ab519068d0e2bb677d7a700decb8d (patch)
treede65a0b6151880ef5d0b06efd949e32629a2dfd5 /mm/oom_kill.c
parent6ce3c4c0ff62ca6391019b7832fb41a7f28b9e26 (diff)
[PATCH] Optimise oom kill of current task
When oom_killer kills current there's no need to call schedule_timeout_interruptible() since task must die ASAP. Signed-Off-By: Pavel Emelianov <xemul@sw.ru> Signed-Off-By: Kirill Korotaev <dev@openvz.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index d348b9035955..4748b906aff2 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -298,7 +298,8 @@ retry:
298 298
299 /* 299 /*
300 * Give "p" a good chance of killing itself before we 300 * Give "p" a good chance of killing itself before we
301 * retry to allocate memory. 301 * retry to allocate memory unless "p" is current
302 */ 302 */
303 schedule_timeout_interruptible(1); 303 if (!test_thread_flag(TIF_MEMDIE))
304 schedule_timeout_interruptible(1);
304} 305}