mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: David Rientjes <rientjes@google.com>
Cc: Rik van Riel <riel@redhat.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	mel@csn.ul.ie, npiggin@suse.de
Subject: Re: [PATCH] copy over oom_adj value at fork time
Date: Fri, 17 Jul 2009 13:03:56 -0700	[thread overview]
Message-ID: <6599ad830907171303v255a0d65t64885d37c41b764a@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907170225570.15373@chino.kir.corp.google.com>

On Fri, Jul 17, 2009 at 2:34 AM, David Rientjes<rientjes@google.com> wrote:
>
> The only way to workaround that is by using the highest oom_adj user for
> the mm_struct from the array in reporting /proc/pid/oom_score, as well.

That sounds fine to me.

> But that would lead to /proc/pid/oom_adj not affecting oom_score at all,
> which isn't consistent.

Isn't consistent with what? It's perfectly consistent with saying "the
oom_score of a task is based on the highest oom_adj value of any task
sharing the same mm". Admittedly it's not 100% consistent with the old
semantics, but I'm having trouble imagining a scenario where someone
was relying on the changed semantics.

But taking a completely different approach, is there a reason that we
couldn't have just moved the do_each_thread() check for OOM_DISABLED
out of oom_kill_task() and into select_bad_process() at the point
where we've decided that the thread in question is a better victim
than the current victim? That would fix the OOM livelock while
allowing us to keep exactly the same oom_adj/oom_score semantics as in
previous kernels.

> The inheritance issue should be fixed with Rik's patch with the exception
> of vfork -> change /proc/pid-of-child/oom_adj -> execve.  If scripts were
> written to do that with the old behavior, they'll have to adjust to change
> oom_adj _after_ the execve

Think about what you're suggesting here - execve() replaces your code
with whatever you're execing, so unless that code is also written to
handle oom_adj (which for something like a generic job scheduler, the
exec'd code is unlikely to do) you're stuck.

Paul

  reply	other threads:[~2009-07-17 20:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200906020557.n525v6KO004302@imap1.linux-foundation.org>
2009-07-15  0:52 ` + oom-move-oom_adj-value-from-task_struct-to-mm_struct.patch added to -mm tree Paul Menage
2009-07-15  1:05   ` [PATCH] copy over oom_adj value at fork time Rik van Riel
2009-07-15  1:15     ` Paul Menage
2009-07-15  2:01       ` KOSAKI Motohiro
2009-07-15  2:12         ` [PATCH -mm] copy over oom_adj value at fork time (v2) Rik van Riel
2009-07-15  3:42           ` David Rientjes
2009-07-15  3:48       ` [PATCH] copy over oom_adj value at fork time David Rientjes
2009-07-16 23:29       ` Paul Menage
2009-07-17  9:34         ` David Rientjes
2009-07-17 20:03           ` Paul Menage [this message]
2009-07-17 23:12             ` David Rientjes
2009-07-20 21:52               ` Paul Menage
2009-07-21  3:40                 ` David Rientjes
2009-07-21  7:19                 ` KOSAKI Motohiro
2009-07-21 16:06                   ` Paul Menage
2009-07-21 19:54                     ` David Rientjes
2009-07-21 19:57                       ` Paul Menage
2009-07-21 20:00                         ` David Rientjes
2009-07-21 20:03                           ` Paul Menage
2009-07-23 23:21                             ` KOSAKI Motohiro
2009-07-23 23:29                               ` David Rientjes
2009-07-24  1:10                                 ` KOSAKI Motohiro
2009-07-24  9:27                                   ` David Rientjes
2009-07-28  6:09                                     ` KOSAKI Motohiro
2009-07-28  6:14                                       ` David Rientjes
2009-07-15  1:49     ` KOSAKI Motohiro

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=6599ad830907171303v255a0d65t64885d37c41b764a@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=npiggin@suse.de \
    --cc=riel@redhat.com \
    --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

all inboxes | Powered by JetHome®