From: Peter Zijlstra <peterz@infradead.org>
To: David Rientjes <rientjes@google.com>
Cc: Paul Jackson <pj@sgi.com>,
akpm@linux-foundation.org, ak@suse.de,
clameter@cthulhu.engr.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] cpusets: do not allow TIF_MEMDIE tasks to allocate globally
Date: Wed, 06 Jun 2007 09:56:53 +0200 [thread overview]
Message-ID: <1181116613.7348.169.camel@twins> (raw)
In-Reply-To: <alpine.DEB.0.99.0706060042550.15316@chino.kir.corp.google.com>
On Wed, 2007-06-06 at 00:48 -0700, David Rientjes wrote:
> On Wed, 6 Jun 2007, Paul Jackson wrote:
>
> > Seems like that mlock code is able then to get great globs of memory
> > without returning to user space ... perhaps that's where the fix
> > should be ... that code should quit chewing up memory if it's
> > marked MEMDIE or some such?
> >
>
> That's one case. Are there others?
>
> The TIF_MEMDIE exception in cpuset_zone_allowed_softwall() allowed this
> problem in mlock(). If it had not been allowed to allocate anywhere
> based simply on the zonelist ordering, the mlock iteration would break
> because it could not handle the fault.
>
> Thus, at the least, we should make sure that memory is not allocated
> outside of a task's mems_allowed unless we do sanity checks against
> gfp_mask in the TIF_MEMDIE case via cpuset_zone_allowed_softwall() to make
> sure a rouge application doesn't cause the same trouble. That is, unless
> you can guarantee this type of problem will not happen again through any
> other means. The logic needs to be with the TIF_MEMDIE exception to grant
> access to memory outside the cpuset only when it is relevant to the OOM
> killed task's prompt exit.
I don't think your patch alone would have been sufficient. With it it
would have depleted the local reserves and then jumped onwards to other
nodes (since the ALLOC_NO_WATERMARKS allocation doesn't have
ALLOC_CPUSET).
Unless there was a mem-policy restricting the zonelist (not sure if
cpusets and mem-policies are independent like that)
But your point stands.
prev parent reply other threads:[~2007-06-06 7:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 22:39 [patch] cpusets: do not allow TIF_MEMDIE tasks to allocate globally David Rientjes
2007-06-05 22:40 ` Christoph Lameter
2007-06-05 22:42 ` David Rientjes
2007-06-05 23:01 ` Paul Jackson
2007-06-05 23:16 ` David Rientjes
2007-06-05 23:19 ` Paul Jackson
2007-06-05 23:20 ` Christoph Lameter
2007-06-05 23:25 ` David Rientjes
2007-06-05 23:32 ` Christoph Lameter
2007-06-05 23:44 ` David Rientjes
2007-06-05 23:55 ` Paul Jackson
2007-06-06 1:17 ` David Rientjes
2007-06-06 1:20 ` Paul Jackson
2007-06-05 23:57 ` Christoph Lameter
2007-06-06 1:23 ` David Rientjes
2007-06-06 1:32 ` Christoph Lameter
2007-06-06 1:40 ` David Rientjes
2007-06-06 1:54 ` Christoph Lameter
2007-06-06 3:29 ` David Rientjes
2007-06-06 6:20 ` Peter Zijlstra
2007-06-06 6:42 ` David Rientjes
2007-06-06 7:09 ` Peter Zijlstra
2007-06-06 7:18 ` David Rientjes
2007-06-06 7:34 ` Paul Jackson
2007-06-06 7:39 ` Andrew Morton
2007-06-06 7:48 ` David Rientjes
2007-06-06 7:56 ` Paul Jackson
2007-06-06 8:00 ` Andrew Morton
2007-06-06 8:03 ` Peter Zijlstra
2007-06-06 7:56 ` Peter Zijlstra [this message]
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=1181116613.7348.169.camel@twins \
--to=peterz@infradead.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@cthulhu.engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.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