linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: oom: do not reap task if there are live threads in threadgroup
@ 2016-05-24 11:00 Vladimir Davydov
  2016-05-24 11:46 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Davydov @ 2016-05-24 11:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Michal Hocko, Tetsuo Handa, linux-mm, linux-kernel

If the current process is exiting, we don't invoke oom killer, instead
we give it access to memory reserves and try to reap its mm in case
nobody is going to use it. There's a mistake in the code performing this
check - we just ignore any process of the same thread group no matter if
it is exiting or not - see try_oom_reaper. Fix it.

Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
---
 mm/oom_kill.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index c0e37dd1422f..03bf7a472296 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -618,8 +618,6 @@ void try_oom_reaper(struct task_struct *tsk)
 
 			if (!process_shares_mm(p, mm))
 				continue;
-			if (same_thread_group(p, tsk))
-				continue;
 			if (fatal_signal_pending(p))
 				continue;
 
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-24 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 11:00 [PATCH] mm: oom: do not reap task if there are live threads in threadgroup Vladimir Davydov
2016-05-24 11:46 ` Michal Hocko
2016-05-24 12:21   ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox