[PATCH] oom kill of current task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-Off-By: Pavel Emelianov <[email protected]>
Signed-Off-By: Kirill Korotaev <[email protected]>

P.S. against 2.6.15

--- ./mm/oom_kill.c.oomkill	2006-01-06 15:16:45.000000000 +0300
+++ ./mm/oom_kill.c	2006-01-06 15:19:21.130652864 +0300
@@ -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);
 }


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux