linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: David Rientjes <rientjes@google.com>
Cc: John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/5] staging: android: lowmemorykiller: Add config option to support oom_adj values
Date: Wed, 27 Feb 2013 15:47:17 -0800	[thread overview]
Message-ID: <CAMP5XgemB4AdKEY4HFLwupo1CGv89hbmB+HUYYN8qdQRYCTdHg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1302271509230.24485@chino.kir.corp.google.com>

On Wed, Feb 27, 2013 at 3:12 PM, David Rientjes <rientjes@google.com> wrote:
> On Wed, 27 Feb 2013, Arve Hjønnevåg wrote:
>
>> > Umm, writes to /proc/pid/oom_adj already are converted to the
>> > /proc/pid/oom_score_adj scale linearly.  Heavy NACK to this patch since
>> > oom_adj is completely deprecated.
>>
>> I know it is deprecated, but your change, staging: android,
>> lowmemorykiller: convert to use oom_score_adj, broke existing
>> user-space code that still write to /proc/pid/oom_adj. This option
>> lets you build a kernel that supports our user-space code until that
>> user-space has been converted to use /proc/pid/oom_score_adj.
>>
>
> As stated, writes to /proc/pid/oom_adj already are converted to a linear
> scale and stored in /proc/pid/oom_score_adj.  This is done with
>
>         oom_adj == 15   ->      oom_score_adj = 1000
>         oom_adj != 15   ->      oom_score_adj = (oom_adj * -1000) / -17
>
> since the maximum oom_score_adj is 1000 and the minimum oom_adj is -17.
>
> How does this not work as needed?

Because, without this patch, the values written to
/sys/module/lowmemorykiller/parameters/adj do not get adjusted and
therefore do not match the correct processes.

-- 
Arve Hjønnevåg

  reply	other threads:[~2013-02-27 23:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27  6:07 [PATCH 0/5] staging: Updates from the Android tree (for 3.10) John Stultz
2013-02-27  6:07 ` [PATCH 1/5] staging: android: lowmemorykiller: Add config option to support oom_adj values John Stultz
2013-02-27 22:18   ` David Rientjes
2013-02-27 22:38     ` Arve Hjønnevåg
2013-02-27 23:12       ` David Rientjes
2013-02-27 23:47         ` Arve Hjønnevåg [this message]
2013-02-28  0:14           ` David Rientjes
2013-02-28  1:05             ` Arve Hjønnevåg
2013-02-28  1:41               ` David Rientjes
2013-02-27  6:07 ` [PATCH 2/5] staging: android: lowmemorykiller: Don't count reserved free memory John Stultz
2013-02-27 22:19   ` David Rientjes
2013-02-27  6:07 ` [PATCH 3/5] staging: android: lowmemorykiller: Change default debug_level to 1 John Stultz
2013-02-27  6:07 ` [PATCH 4/5] staging: android: logger: Allow a UID to read it's own log entries John Stultz
2013-02-27  6:07 ` [PATCH 5/5] staging: android: logger: enforce GID and CAP check on log flush John Stultz
2013-03-05  8:39 ` [PATCH 0/5] staging: Updates from the Android tree (for 3.10) Greg Kroah-Hartman
2013-03-05  9:56   ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP5XgemB4AdKEY4HFLwupo1CGv89hbmB+HUYYN8qdQRYCTdHg@mail.gmail.com \
    --to=arve@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).