* [patch] oom: kill all threads that share mm with killed task
@ 2007-04-24 4:36 David Rientjes
2007-04-24 5:49 ` William Lee Irwin III
2007-04-24 5:49 ` Christoph Lameter
0 siblings, 2 replies; 4+ messages in thread
From: David Rientjes @ 2007-04-24 4:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andi Kleen, Christoph Lameter, linux-kernel
oom_kill_task() calls __oom_kill_task() to OOM kill a selected task.
When finding other threads that share an mm with that task, we need to
kill those individual threads and not the same one.
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/oom_kill.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -333,7 +333,7 @@ static int oom_kill_task(struct task_struct *p)
*/
do_each_thread(g, q) {
if (q->mm == mm && q->tgid != p->tgid)
- force_sig(SIGKILL, p);
+ force_sig(SIGKILL, q);
} while_each_thread(g, q);
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] oom: kill all threads that share mm with killed task
2007-04-24 4:36 [patch] oom: kill all threads that share mm with killed task David Rientjes
@ 2007-04-24 5:49 ` William Lee Irwin III
2007-04-24 5:49 ` Christoph Lameter
1 sibling, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2007-04-24 5:49 UTC (permalink / raw)
To: David Rientjes
Cc: Linus Torvalds, Andi Kleen, Christoph Lameter, linux-kernel
On Mon, Apr 23, 2007 at 09:36:13PM -0700, David Rientjes wrote:
> oom_kill_task() calls __oom_kill_task() to OOM kill a selected task.
> When finding other threads that share an mm with that task, we need to
> kill those individual threads and not the same one.
ISTR shooting down something of this form a while back. I suppose it
got resurrected.
Acked-by: William Irwin <bill.irwin@oracle.com>
-- wli
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] oom: kill all threads that share mm with killed task
2007-04-24 4:36 [patch] oom: kill all threads that share mm with killed task David Rientjes
2007-04-24 5:49 ` William Lee Irwin III
@ 2007-04-24 5:49 ` Christoph Lameter
2007-04-24 6:00 ` David Rientjes
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2007-04-24 5:49 UTC (permalink / raw)
To: David Rientjes; +Cc: Linus Torvalds, Andi Kleen, linux-kernel
On Mon, 23 Apr 2007, David Rientjes wrote:
> oom_kill_task() calls __oom_kill_task() to OOM kill a selected task.
> When finding other threads that share an mm with that task, we need to
> kill those individual threads and not the same one.
Obvious fix. It was broken by
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f2a2a7108aa0039ba7a5fe7a0d2ecef2219a7584
Dec 7. So its in 2.6.20 and later. Candiate for stable?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] oom: kill all threads that share mm with killed task
2007-04-24 5:49 ` Christoph Lameter
@ 2007-04-24 6:00 ` David Rientjes
0 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2007-04-24 6:00 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Linus Torvalds, Andi Kleen, linux-kernel
On Mon, 23 Apr 2007, Christoph Lameter wrote:
> Obvious fix. It was broken by
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f2a2a7108aa0039ba7a5fe7a0d2ecef2219a7584
> Dec 7. So its in 2.6.20 and later. Candiate for stable?
>
I agree it's obvious enough that it should be included in stable.
Otherwise the entire iteration becomes a big no-op and it won't alleviate
the OOM condition in one call to out_of_memory() because there may be
outstanding tasks with the shared ->mm.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-24 6:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24 4:36 [patch] oom: kill all threads that share mm with killed task David Rientjes
2007-04-24 5:49 ` William Lee Irwin III
2007-04-24 5:49 ` Christoph Lameter
2007-04-24 6:00 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).