[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1008251746200.28401@chino.kir.corp.google.com>
Date: Wed, 25 Aug 2010 17:52:06 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Minchan Kim <minchan.kim@...il.com>
Subject: Re: [PATCH 1/2][BUGFIX] oom: remove totalpage normalization from
oom_badness()
On Thu, 26 Aug 2010, KAMEZAWA Hiroyuki wrote:
> I'm now trying to write a userspace tool to calculate this, for me.
> Then, could you update documentation ?
> ==
> 3.2 /proc/<pid>/oom_score - Display current oom-killer score
> -------------------------------------------------------------
>
> This file can be used to check the current score used by the oom-killer is for
> any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
> process should be killed in an out-of-memory situation.
> ==
>
You'll want to look at section 3.1 of Documentation/filesystems/proc.txt,
which describes /proc/pid/oom_score_adj, not 3.2.
> add a some documentation like:
> ==
> (For system monitoring tool developpers, not for usual users.)
> oom_score calculation is implemnentation dependent and can be modified without
> any caution. But current logic is
>
> oom_score = ((proc's rss + proc's swap) / (available ram + swap)) + oom_score_adj
>
I'd hesitate to state the formula outside of the implementation and
instead focus on the semantics of oom_score_adj (as a proportion of
available memory compared to other tasks), which I tried doing in section
3.1. Then, the userspace tool only need be concerned about the units of
oom_score_adj rather than whether rss, swap, or later extentions such as
shm are added.
Thanks for working on this, Kame!
--
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