Skip to contentSkip to conversation

oom kill of current task

PATCH New Kirill Korotaev 1 participant 1 message Jan 6, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oom kill of current task

When oom_killer kills current there's no need to call schedule_timeout_interruptible() since task must die ASAP.

P.S. against 2.6.15

mm/oom_kill.c renamed from mm/oom_kill.c.oomkill +3 -2
@@ -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);
 }