From: Paul Mundt <lethal@linux-sh.org>
To: Matt Mackall <mpm@selenic.com>
Cc: Christoph Lameter <clameter@sgi.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, ak@suse.de, hugh@veritas.com,
lee.schermerhorn@hp.com, Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH] numa: mempolicy: dynamic interleave map for system init.
Date: Wed, 13 Jun 2007 11:53:37 +0900 [thread overview]
Message-ID: <20070613025337.GA15009@linux-sh.org> (raw)
In-Reply-To: <20070612153234.GI11115@waste.org>
On Tue, Jun 12, 2007 at 10:32:34AM -0500, Matt Mackall wrote:
> On Tue, Jun 12, 2007 at 06:43:59PM +0900, Paul Mundt wrote:
> > On Fri, Jun 08, 2007 at 09:50:11AM -0500, Matt Mackall wrote:
> > > Haven't given any thought to NUMA yet though..
> > >
> > This is what I've hacked together and tested with my small nodes. It's
> > not terribly intelligent, and it pushes off most of the logic to the page
> > allocator. Obviously it's not terribly scalable, and I haven't tested it
> > with page migration, either. Still, it works for me with my simple tmpfs
> > + mpol policy tests.
> >
> > Tested on a UP + SPARSEMEM (static, not extreme) + NUMA (2 nodes) + SLOB
> > configuration.
> >
> > Flame away!
>
> For starters, it's not against the current SLOB, which no longer has
> the bigblock list.
>
Sorry about that, seems I used the wrong tree.
> > -void *__kmalloc(size_t size, gfp_t gfp)
> > +static void *__kmalloc_alloc(size_t size, gfp_t gfp, int node)
>
> That's a ridiculous name. So, uh.. more underbars!
>
Agreed, though I couldn't think of a better one.
> Though really, I think you can just name it __kmalloc_node?
>
No, kmalloc_node and __kmalloc_node are both required by CONFIG_NUMA,
otherwise that would have been the logical choice.
> > + if (node == -1)
> > + pages = alloc_pages(flags, get_order(c->size));
> > + else
> > + pages = alloc_pages_node(node, flags,
> > + get_order(c->size));
>
> This fragment appears a few times. Looks like it ought to get its own
> function. And that function can reduce to a trivial inline in the
> !NUMA case.
>
Ok.
> > +void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
> > +{
> > + return __kmem_cache_alloc(c, flags, node);
> > +}
>
> If we make the underlying functions all take a node, this stuff all
> gets simpler.
>
Could you elaborate on that? We only require the node specifier in the
allocation path, and this simply hands it down in accordance with the
existing APIs. After allocation time the node id is encoded in the page
flags, so we can easily figure out which node a page is tied to.
I'll post the updated patch separately.
--
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>
next prev parent reply other threads:[~2007-06-13 2:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 1:17 Paul Mundt
2007-06-08 1:01 ` Andrew Morton
2007-06-08 2:47 ` Christoph Lameter
2007-06-08 3:01 ` Andrew Morton
2007-06-08 3:11 ` Christoph Lameter
2007-06-08 3:25 ` Paul Mundt
2007-06-08 3:49 ` Christoph Lameter
2007-06-08 4:13 ` Paul Mundt
2007-06-08 4:27 ` Christoph Lameter
2007-06-08 6:05 ` Paul Mundt
2007-06-08 6:09 ` Christoph Lameter
2007-06-08 6:27 ` Paul Mundt
2007-06-08 6:43 ` Christoph Lameter
2007-06-08 14:50 ` Matt Mackall
2007-06-12 2:36 ` Nick Piggin
2007-06-12 9:43 ` Paul Mundt
2007-06-12 15:32 ` Matt Mackall
2007-06-13 2:10 ` Nick Piggin
2007-06-13 3:12 ` Matt Mackall
2007-06-13 2:53 ` Paul Mundt [this message]
2007-06-13 3:16 ` Matt Mackall
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=20070613025337.GA15009@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=hugh@veritas.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=nickpiggin@yahoo.com.au \
/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