From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756473AbbJ1XyJ (ORCPT ); Wed, 28 Oct 2015 19:54:09 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35554 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbbJ1XyH (ORCPT ); Wed, 28 Oct 2015 19:54:07 -0400 Date: Wed, 28 Oct 2015 16:54:04 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: =?UTF-8?Q?Hongjie_Fang_=28=E6=96=B9=E6=B4=AA=E6=9D=B0=29?= cc: Michal Hocko , "Eric W. Biederman" , "linux-kernel@vger.kernel.org" Subject: =?UTF-8?Q?Re=3A_=E7=AD=94=E5=A4=8D=3A_=5BPATCHv2_4=2E3-rc6=5D_proc=3A_fix_convert_from_oom=5Fscore=5Fadj_to_oom=5Fadj?= In-Reply-To: <5eff586de266418090f792077fcff993@SHMBX01.spreadtrum.com> Message-ID: References: <1f80189385e540c2a5b2747a7a265d8c@SHMBX01.spreadtrum.com>, <5eff586de266418090f792077fcff993@SHMBX01.spreadtrum.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="397176738-478271262-1446076444=:15960" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --397176738-478271262-1446076444=:15960 Content-Type: TEXT/PLAIN; charset=gb2312 Content-Transfer-Encoding: 8BIT 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. --397176738-478271262-1446076444=:15960--