Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -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
	 */
	 */
	if (!test_thread_flag(TIF_MEMDIE))
		schedule_timeout_interruptible(1);
		schedule_timeout_interruptible(1);
}
}