lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] oom: skip frozen tasks
From
Date
All frozen tasks are unkillable, and if one of them has TIF_MEMDIE
we must kill something else to avoid deadlock. After this patch
select_bad_process() will skip frozen task before checking TIF_MEMDIE.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
mm/oom_kill.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 626303b..931ab20 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -138,6 +138,8 @@ static bool oom_unkillable_task(struct task_struct *p,
return true;
if (p->flags & PF_KTHREAD)
return true;
+ if (p->flags & PF_FROZEN)
+ return true;

/* When mem_cgroup_out_of_memory() and p is not member of the group */
if (mem && !task_in_mem_cgroup(p, mem))


\
 
 \ /
  Last update: 2011-08-23 09:33    [W:0.241 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site