Commit 2f659f46 authored by Kirill Korotaev's avatar Kirill Korotaev Committed by Linus Torvalds

[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: default avatarPavel Emelianov <xemul@sw.ru>
Signed-Off-By: default avatarKirill Korotaev <dev@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6ce3c4c0
......@@ -298,7 +298,8 @@ void out_of_memory(gfp_t gfp_mask, int order)
/*
* 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);
}
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