Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756907AbZJ1AIr (ORCPT ); Tue, 27 Oct 2009 20:08:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756884AbZJ1AIr (ORCPT ); Tue, 27 Oct 2009 20:08:47 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:35192 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756541AbZJ1AIq (ORCPT ); Tue, 27 Oct 2009 20:08:46 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:reply-to:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:x-age:x-location :x-os:x-face:content-type:content-transfer-encoding; b=IHqnghA9B+KgAsGiqg0bkOLQymu/tqpAciZnURg8mePGEGdLL1A/uN118F/yTzkePB tWO1xOKVE3Vy9zQo/uoFeOF4615IonLnUC4EzNbxo+VtymZIoe1TbnGDrevcXa2mCkVW nPeLXCWuYAlRcEl5I+hUOf1LDCoXOr7oP14LE= Message-ID: <4AE78B8F.9050201@gmail.com> Date: Wed, 28 Oct 2009 01:08:47 +0100 From: =?UTF-8?B?VmVkcmFuIEZ1cmHEjQ==?= Reply-To: vedran.furac@gmail.com Organization: Home User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090701 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: David Rientjes CC: Hugh Dickins , KAMEZAWA Hiroyuki , linux-mm@kvack.org, linux-kernel@vger.kernel.org, KOSAKI Motohiro , minchan.kim@gmail.com, Andrew Morton , Andrea Arcangeli Subject: Re: Memory overcommit References: <20091013120840.a844052d.kamezawa.hiroyu@jp.fujitsu.com> <20091014135119.e1baa07f.kamezawa.hiroyu@jp.fujitsu.com> <4ADE3121.6090407@gmail.com> <20091026105509.f08eb6a3.kamezawa.hiroyu@jp.fujitsu.com> <4AE5CB4E.4090504@gmail.com> <20091027122213.f3d582b2.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: X-Age: 25 X-Location: Lovran, Croatia X-OS: Debian GNU/Linux X-Face: +Lg7^E:?#]P.Y{N@61yW{aY#>fRcOE6MMqgAM|Kwk"fK!y!i4+h6&?E`Jt@uame[-SLu#*?k:)dZv X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 53 David Rientjes wrote: > There's advantages to either approach, but it depends on the contextual > goal of the oom killer when it's called: kill a rogue task that is > allocating more memory than expected, 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! QED by newbie. ;) > or kill a task that will free the most memory. . -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/