Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756551AbZJ0SCg (ORCPT ); Tue, 27 Oct 2009 14:02:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756527AbZJ0SCg (ORCPT ); Tue, 27 Oct 2009 14:02:36 -0400 Received: from mail-iw0-f178.google.com ([209.85.223.178]:48130 "EHLO mail-iw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756525AbZJ0SCf (ORCPT ); Tue, 27 Oct 2009 14:02:35 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=oDIVsfBS6b5FG/g6AC2+/Ga5iHUmTDzKO6GQVKXdEn9FiFnxbwhZFxon4Nhq8mutOt REO/LOydbrlgJr3nIp9YXk+iEjtWbzH46F0oQtfZV7c3tL4Upi1WHgodF7G1akmpkh68 cqZfFe7i3fmPerB2U9GpWcioIqetBgIMAc4ro= MIME-Version: 1.0 In-Reply-To: <4AE72A0D.9070804@gmail.com> 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> <4AE72A0D.9070804@gmail.com> Date: Wed, 28 Oct 2009 03:02:39 +0900 X-Google-Sender-Auth: 8ecc92681714d24e Message-ID: <2f11576a0910271102g60dcdd1dj8f3df213bc64a51d@mail.gmail.com> Subject: Re: Memory overcommit From: KOSAKI Motohiro To: vedran.furac@gmail.com Cc: KAMEZAWA Hiroyuki , linux-mm@kvack.org, linux-kernel@vger.kernel.org, hugh.dickins@tiscali.co.uk, akpm@linux-foundation.org, rientjes@google.com Content-Type: multipart/mixed; boundary=0016e6460848e5c3860476ee7b40 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5935 Lines: 100 --0016e6460848e5c3860476ee7b40 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable >> I attached a scirpt for checking oom_score of all exisiting process. >> (oom_score is a value used for selecting "bad" processs.") >> please run if you have time. > > 96890 =A0 21463 =A0 VirtualBox // OK > 118615 =A011144 =A0 kded4 // WRONG > 127455 =A011158 =A0 knotify4 // WRONG > 132198 =A01 =A0 =A0 =A0 init // WRONG > 133940 =A011151 =A0 ksmserver // WRONG > 134109 =A011224 =A0 audacious2 // Audio player, maybe > 145476 =A021503 =A0 VirtualBox // OK > 174939 =A011322 =A0 icedove-bin // thunderbird, maybe > 178015 =A011223 =A0 akregator // rss reader, maybe > 201043 =A022672 =A0 krusader =A0// WRONG > 212609 =A011187 =A0 krunner // WRONG > 256911 =A024252 =A0 test // culprit, malloced 1GB > 1750371 11318 =A0 run-mozilla.sh // tiny, parent of firefox threads > 2044902 11141 =A0 kdeinit4 // tiny, parent of most KDE apps Verdran, I made alternative improvement idea. Can you please mesure badness score on your system? Maybe your culprit process take biggest badness value. Note: this patch change time related thing. So, please drink a cup of coffee before mesurement. small rest time makes correct test result. --0016e6460848e5c3860476ee7b40 Content-Type: application/octet-stream; name="0001-oom-oom-score-bonus-by-run_time-use-proportional-va.patch" Content-Disposition: attachment; filename="0001-oom-oom-score-bonus-by-run_time-use-proportional-va.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g1ayn0fk0 RnJvbSAwNDdlNjY0N2Y1ODBhN2M5YmVkMmFjNTQ3YmM5YjE1MTU0ZDVkYTRjIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLT1NBS0kgTW90b2hpcm8gPGtvc2FraS5tb3RvaGlyb0BqcC5m dWppdHN1LmNvbT4KRGF0ZTogV2VkLCAyOCBPY3QgMjAwOSAw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PSAodXB0aW1lIC0gcC0+cmVhbF9zdGFy dF90aW1lLnR2X3NlYyk7CisJCWlmICghcnVuX3RpbWUpCisJCQlydW5fdGltZSA9IDE7CisKKwkJ cnVuX3RpbWUgPSAoKHJ1bl90aW1lICogMTAwKSAvIHVwdGltZSkgKyAxOworCQlwb2ludHMgLz0g aW50X3NxcnQocnVuX3RpbWUpOworCX0KIAogCS8qCiAJICogTmljZWQgcHJvY2Vzc2VzIGFyZSBt b3N0IGxpa2VseSBsZXNzIGltcG9ydGFudCwgc28gZG91YmxlCkBAIC0yMzMsNiArMjM2LDcgQEAg c3RhdGljIHN0cnVjdCB0YXNrX3N0cnVjdCAqc2VsZWN0X2JhZF9wcm9jZXNzKHVuc2lnbmVkIGxv bmcgKnBwb2ludHMsCiAJKnBwb2ludHMgPSAwOwogCiAJZG9fcG9zaXhfY2xvY2tfbW9ub3Rvbmlj X2dldHRpbWUoJnVwdGltZSk7CisJbW9ub3RvbmljX3RvX2Jvb3RiYXNlZCgmdXB0aW1lKTsKIAlm b3JfZWFjaF9wcm9jZXNzKHApIHsKIAkJdW5zaWduZWQgbG9uZyBwb2ludHM7CiAKLS0gCjEuNi4y LjUKCg== --0016e6460848e5c3860476ee7b40-- -- 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/