From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id 8C793600429 for ; Mon, 2 Aug 2010 22:06:40 -0400 (EDT) Received: from m4.gw.fujitsu.co.jp ([10.0.50.74]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o732AXnS009269 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Tue, 3 Aug 2010 11:10:33 +0900 Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 589FF45DE7E for ; Tue, 3 Aug 2010 11:10:33 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 50EFD45DEA7 for ; Tue, 3 Aug 2010 11:10:28 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 291911DB804B for ; Tue, 3 Aug 2010 11:10:28 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 8A878E38003 for ; Tue, 3 Aug 2010 11:10:24 +0900 (JST) Date: Tue, 3 Aug 2010 11:05:34 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [patch -mm 1/2] oom: badness heuristic rewrite Message-Id: <20100803110534.e3e7a697.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <20100730091125.4AC3.A69D9226@jp.fujitsu.com> <20100729183809.ca4ed8be.akpm@linux-foundation.org> <20100730195338.4AF6.A69D9226@jp.fujitsu.com> <20100802134312.c0f48615.akpm@linux-foundation.org> <20100803090058.48c0a0c9.kamezawa.hiroyu@jp.fujitsu.com> <20100803093610.f4d30ca7.kamezawa.hiroyu@jp.fujitsu.com> <20100803100815.11d10519.kamezawa.hiroyu@jp.fujitsu.com> <20100803102423.82415a17.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: Andrew Morton , KOSAKI Motohiro , Nick Piggin , Oleg Nesterov , Balbir Singh , linux-mm@kvack.org List-ID: On Mon, 2 Aug 2010 18:52:40 -0700 (PDT) David Rientjes wrote: > On Tue, 3 Aug 2010, KAMEZAWA Hiroyuki wrote: > > > > Hmm, then, oom_score shows the values for all limitations in array ? > > > > > Anyway, the fact "oom_score can be changed by the context of OOM" may > > confuse admins. "OMG, why low oom_score application is killed! Shit!" > > > > Please add additional cares for users if we go this way or remove > > user visible oom_score file from /proc. > > > > Sure, a task could be killed with a very low /proc/pid/oom_score, but only > if its cpuset is oom, for example, and it has the highest score of all > tasks attached to that oom_score. So /proc/pid/oom_score needs to be > considered in the context in which the oom occurs: system-wide, cpuset, > mempolicy, or memcg. That's unchanged from the old oom killer. > unchanged ? Assume 2 proceses A, B which has oom_score_adj of 300 and 0 And A uses 200M, B uses 1G of memory under 4G system Under the system. A's socre = (200M *1000)/4G + 300 = 350 B's score = (1G * 1000)/4G = 250. In the cpuset, it has 2G of memory. A's score = (200M * 1000)/2G + 300 = 400 B's socre = (1G * 1000)/2G = 500 This priority-inversion don't happen in current system. I misunderstand ? Thanks, -Kame -- 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: email@kvack.org