From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756671AbbJ2Dzp (ORCPT ); Wed, 28 Oct 2015 23:55:45 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:54065 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756410AbbJ2Dzn convert rfc822-to-8bit (ORCPT ); Wed, 28 Oct 2015 23:55:43 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: David Rientjes Cc: =?utf-8?B?SG9uZ2ppZSBGYW5nICjmlrnmtKrmnbAp?= , Michal Hocko , "linux-kernel\@vger.kernel.org" References: <1f80189385e540c2a5b2747a7a265d8c@SHMBX01.spreadtrum.com> <5eff586de266418090f792077fcff993@SHMBX01.spreadtrum.com> Date: Wed, 28 Oct 2015 22:47:47 -0500 In-Reply-To: (David Rientjes's message of "Wed, 28 Oct 2015 16:54:04 -0700 (PDT)") Message-ID: <87eggeuyho.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-XM-AID: U2FsdGVkX1/58blXmsuLcVPFCzVbVV8M+75t5SQonPw= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 1.0 XM_ULScore_01 UL-obfuscated credit score reference * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 BAYES_40 BODY: Bayes spam probability is 20 to 40% * [score: 0.3626] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;David Rientjes X-Spam-Relay-Country: X-Spam-Timing: total 1189 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 3.7 (0.3%), b_tie_ro: 2.7 (0.2%), parse: 0.91 (0.1%), extract_message_metadata: 2.5 (0.2%), get_uri_detail_list: 0.82 (0.1%), tests_pri_-1000: 3.5 (0.3%), tests_pri_-950: 1.24 (0.1%), tests_pri_-900: 1.03 (0.1%), tests_pri_-400: 17 (1.4%), check_bayes: 16 (1.3%), b_tokenize: 4.3 (0.4%), b_tok_get_all: 5 (0.4%), b_comp_prob: 1.61 (0.1%), b_tok_touch_all: 2.4 (0.2%), b_finish: 0.65 (0.1%), tests_pri_0: 1147 (96.4%), tests_pri_500: 4.3 (0.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: =?utf-8?B?562U5aSNOg==?= [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Rientjes writes: > 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. If you really want to remove /proc/pid/oom_adj start by placing it in a Kconfig so people can make it go away. Eric