From: Paul Menage <menage@google.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch -mmotm] mm: introduce oom_adj_child
Date: Mon, 27 Jul 2009 16:48:41 -0700 [thread overview]
Message-ID: <6599ad830907271648v41b006c0j727fc09665f4f47e@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907261446050.12973@chino.kir.corp.google.com>
On Sun, Jul 26, 2009 at 2:50 PM, David Rientjes<rientjes@google.com> wrote:
> +If oom_adj_child is set to equal oom_adj, then it will mirror oom_adj whenever
> +it changes. This avoids having to set both values when simply tuning oom_adj
> +and that value should be inherited by all children.
Maybe have a distinct value for oom_adj_child (the default) that means
"default to mm->oom_adj" ?
Shouldn't oom_adj_child be per-task? Otherwise you're theoretically
allowing races between different threads that try to fork children
with different oom_adj values at the same time. Not a particularly
likely problem, but it seems bad to bake the change of races into the
API.
Also, I'm not sure that the requirement that oom_adj_child be >=
oom_adj is a good restriction. Sure, if a task gives its child a lower
oom_adj than itself it's potentially playing with fire, but it may
well be that the new child is expected todaemonize itself in the very
near future and hence no longer be the child of the current process. I
don't think that restricting the values that the sysadmin or root
processes can apply on the grounds that they might not do what they
want is the right approach.
It would also maybe be nicer to use a prctl() rather than introducing
yet another file in /proc/<pid> - but I guess that's a style argument
rather than a strict technical issue.
Paul
next prev parent reply other threads:[~2009-07-27 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-26 21:50 David Rientjes
2009-07-27 23:48 ` Paul Menage [this message]
2009-07-28 0:10 ` David Rientjes
2009-07-28 0:30 ` Paul Menage
2009-07-28 0:45 ` David Rientjes
2009-07-28 0:47 ` Paul Menage
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=6599ad830907271648v41b006c0j727fc09665f4f47e@mail.gmail.com \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--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®