From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: kosaki.motohiro@jp.fujitsu.com, Paul Menage <menage@google.com>,
Rik van Riel <riel@redhat.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>, Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] copy over oom_adj value at fork time
Date: Tue, 28 Jul 2009 15:09:13 +0900 (JST) [thread overview]
Message-ID: <20090728120822.D80C.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907240227070.32622@chino.kir.corp.google.com>
> On Fri, 24 Jul 2009, KOSAKI Motohiro wrote:
>
> > > Simply reverting it isn't an option unless you fix the underlying livelock
> > > problem that my patches originally addressed and no viable alternative has
> > > been proposed.
> >
> > I disagree.
> > I agree with old behavior have one bug. but it doesn't provide any regression
> > allowing reason although old behavior is totally suck.
> >
>
> I don't understand most of this, sorry. I think what you're saying is
> that you don't fix one bug by introducing another.
>
> The "regression" here is that changing /proc/pid/oom_adj for a vfork'd
> child would change the oom_adj value of the parent as well. That is
> actually the behavior that leads to the livelock where the oom killer
> would repeatedly select a child and it could not be killed because it
> shares memory with an OOM_DISABLE parent. That would cause the oom killer
> to be called by the page allocator infinitely without ever freeing memory.
Actually, if we assume the administrator is really stupid, he can mark
all processes as OOM_DISABLE. it makes livelock anyway.
ITOH, we never seen this livelock on vfork()ed application.
More important thing is: Documentation/filesysmtem/proc/txt says
oom_adj is process property and vfork()ed parent and child are definitelly
another process.
> That behavior is unacceptable, so I disagree that reverting my patches is
> an option.
>
> I suggested a workaround by introducing /proc/pid/oom_adj_child which
> applications would need to use instead of oom_adj after vfork() and prior
> to execve() (if such open source applications exist in the first place).
>
> > Not solve. "please rewrite your application" isn't good solution.
> >
>
> They'd need to use the new interface because the old behavior would lead
> to a kernel livelock because it allowed tasks sharing memory to be
> oom disabled and enabled at the same time. That seems like a very good
> reason to fix the application, otherwise it may livelock the kernel if its
> ooms before exec. The behavior you're defending is the SOURCE of the
> livelock.
>
> > Hm...
> > This is just idea, Does moving oom_adj from mm_struct to signal_struct solve
> > this problem?
> > I mean vfork() share mm_struct, but doesn't share signal_struct.
> >
>
> oom_adj values are not a characteristic of signals, they are a trait of
> memory. They specify how the oom killer should favor (or disable) amounts
> of memory in oom conditions.
That's ok. nobody think struct signal is signal related structure. almost member are
signal unrelated already.
next prev parent reply other threads:[~2009-07-28 6:09 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
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 [this message]
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=20090728120822.D80C.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=menage@google.com \
--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®