提交 2f659f46 编写于 作者: K Kirill Korotaev 提交者: 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: NPavel Emelianov <xemul@sw.ru>
Signed-Off-By: NKirill Korotaev <dev@openvz.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6ce3c4c0
...@@ -298,7 +298,8 @@ void out_of_memory(gfp_t gfp_mask, int order) ...@@ -298,7 +298,8 @@ void out_of_memory(gfp_t gfp_mask, int order)
/* /*
* Give "p" a good chance of killing itself before we * 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册