From: Randy Dunlap <randy.dunlap@oracle.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Robin Holt <holt@sgi.com>, Christoph Lameter <clameter@sgi.com>,
Andi Kleen <ak@suse.de>
Subject: Re: tmpfs and numa mempolicy
Date: Mon, 4 Jun 2007 09:44:52 -0700 [thread overview]
Message-ID: <20070604094452.6eae8828.randy.dunlap@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706041307560.12071@blonde.wat.veritas.com>
On Mon, 4 Jun 2007 13:43:33 +0100 (BST) Hugh Dickins wrote:
> On Sun, 3 Jun 2007, Randy Dunlap wrote:
> >
> > If someone mounts tmpfs as in
> >
> > > mount -t tmpfs -o size=10g,nr_inodes=10k,mode=777,mpol=prefer:1 \
> > tmpfs /mytmpfs
> >
> > but does not have a node 1, bad things happen when /mytmpfs is accessed.
> > (CONFIG_NUMA=y)
> >
> > Is this just a case of shoot self in foot, DDT (don't do that)?
>
> Thanks for finding that, Randy.
>
> While it's true that you have to be privileged to mount in the first
> place (so this isn't too serious), I don't think we can dismiss it as
> just root shooting own foot: we are in the habit of validating mount
> arguments to avoid obvious crashes, so ought to do something about this.
I agree. Thanks.
> I've appended a patch to check node_online_map below, and update
> tmpfs.txt accordingly. I'm not entirely happy with it: you and I
> rather need to undo it when testing whether the mpol= parsing works,
> and it is more restrictive than Robin or I intended.
>
> But it looks to me like mempolicy.c normally never lets a nonline
> node get into any of its policies, and it would be a bit tedious,
> error-prone and unnecessary overhead to relax that: so tmpfs mount
> is at present a dangerous exception in this regard.
>
> Would you be happy with this change, Robin? I'm not very NUMArate:
> do nodes in fact ever get onlined after early system startup?
> If not, then this change would hardly be any real limitation.
>
> Hugh
> [PATCH] mount -t tmpfs -o mpol= check nodes online
>
> Randy Dunlap reports that a tmpfs, mounted with NUMA mpol= specifying
> an offline node, crashes as soon as data is allocated upon it. Now
> restrict it to online nodes, where before it restricted to MAX_NUMNODES.
>
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com> // and tested-by:
> ---
> Documentation/filesystems/tmpfs.txt | 10 +++++-----
> mm/shmem.c | 2 ++
> 2 files changed, 7 insertions(+), 5 deletions(-)
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-06-04 16:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 3:30 Randy Dunlap
2007-06-04 12:43 ` Hugh Dickins
2007-06-04 13:17 ` Robin Holt
2007-06-04 13:43 ` Andi Kleen
2007-06-04 16:44 ` Randy Dunlap [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=20070604094452.6eae8828.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=holt@sgi.com \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
/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