[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0910271723180.17615@chino.kir.corp.google.com>
Date: Tue, 27 Oct 2009 17:25:47 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: vedran.furac@...il.com
cc: Hugh Dickins <hugh.dickins@...cali.co.uk>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
minchan.kim@...il.com, Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: Memory overcommit
On Wed, 28 Oct 2009, Vedran Fura wrote:
> But it is wrong at counting allocated memory!
> Come on, it kills /usr/lib/icedove/run-mozilla.sh. Parent, a shell
> script, instead of its child(s) which allocated memory. Look, "test"
> allocates some (0.1GB) memory, and you have:
>
> % cat test.sh
>
> #!/bin/sh
> ./test&
> ./test&
> ./test&
> ./test
>
> % perl check_badness.pl|sort -n|g test
>
> 26511 7884 test
> 26511 7885 test
> 26511 7886 test
> 26511 7887 test
> 53994 7883 test.sh
>
> // great, so test.sh "is" the bad ass, ok, emulate OOMK:
>
> % kill -9 7883
>
> // did we kill "a rogue task"
>
> % perl check_badness.pl|sort -n|g test
>
> 26511 7884 test
> 26511 7885 test
> 26511 7886 test
> 26511 7887 test
>
> // nooo, they are still alive and eating our memory!
>
This is wrong; it doesn't "emulate oom" since oom_kill_process() always
kills a child of the selected process instead if they do not share the
same memory. The chosen task in that case is untouched.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists