[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1510281651350.15960@chino.kir.corp.google.com>
Date: Wed, 28 Oct 2015 16:54:04 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Hongjie Fang (方洪杰)
<Hongjie.Fang@...eadtrum.com>
cc: Michal Hocko <mhocko@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 答复: [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj
On Wed, 28 Oct 2015, Hongjie Fang (方洪杰) wrote:
> Under a userspace perspective, get a different value than he wrote,
> it must be confusing.
>
It's confusing, but with purpose: it shows there is no direct mapping
between /proc/pid/oom_adj and /proc/pid/oom_score_adj.
/proc/pid/oom_score_adj is the effective policy and has been for years.
The value returned by /proc/pid/oom_adj demonstrates reality vs what is
perceived and is a side-effect of integer division truncating the result
in C.
It's a bad situation, I agree, and we anticipated the complete removal of
/proc/pid/oom_adj years ago since it has been deprecated for years. Maybe
one day we can convince Linus that is possible, but until then we're stuck
with it.
Powered by blists - more mailing lists