From: Paul Mundt <lethal@linux-sh.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: Matt Mackall <mpm@selenic.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] slob: poor man's NUMA, take 2.
Date: Thu, 14 Jun 2007 11:43:44 +0900 [thread overview]
Message-ID: <20070614024344.GB21749@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0706131546380.32399@schroedinger.engr.sgi.com>
On Wed, Jun 13, 2007 at 03:47:42PM -0700, Christoph Lameter wrote:
> On Wed, 13 Jun 2007, Matt Mackall wrote:
>
> > On Wed, Jun 13, 2007 at 06:21:09PM +0900, Paul Mundt wrote:
> > > Here's an updated copy with the node variants always defined.
> > >
> > > I've left the nid=-1 case in as the default for the non-node variants, as
> > > this is the approach also used by SLUB. alloc_pages() is special cased
> > > for NUMA, and takes the memory policy under advisement when doing the
> > > allocation, so the page ends up in a reasonable place.
> > >
> >
> > > +void *__kmalloc(size_t size, gfp_t gfp)
> > > +{
> > > + return __kmalloc_node(size, gfp, -1);
> > > +}
> > > EXPORT_SYMBOL(__kmalloc);
> >
> > > +void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags)
> > > +{
> > > + return kmem_cache_alloc_node(c, flags, -1);
> > > +}
> > > EXPORT_SYMBOL(kmem_cache_alloc);
> >
> > Now promote these guys to inlines in slab.h. At which point all the
> > new NUMA code become a no-op on !NUMA.
>
> The fallback code already exists in kmalloc.h for SLAB/SLUB. You just need
> to enable the #ifdefs for SLOB.
>
> Fallback is for kmem_cache_alloc_node to kmem_cache_alloc.
Yes, this is what I had originally. Matt wants to go the other way,
having the _node variants always defined, and having the non-node
variants simply wrap in to them.
Doing that only for SLOB makes slab.h a bit messy. We could presumably
switch to that sort of behaviour across the board, but that would cause a
bit of churn in SLAB, so it's probably something we want to avoid.
--
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-14 2:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 3:12 Paul Mundt
2007-06-13 3:24 ` Nick Piggin
2007-06-13 3:32 ` Matt Mackall
2007-06-13 3:33 ` Paul Mundt
2007-06-13 3:39 ` Nick Piggin
2007-06-13 3:42 ` Nick Piggin
2007-06-13 4:13 ` Paul Mundt
2007-06-13 4:23 ` Paul Mundt
2007-06-13 5:30 ` Christoph Lameter
2007-06-13 5:42 ` Matt Mackall
2007-06-13 6:44 ` Nick Piggin
2007-06-13 9:50 ` Paul Mundt
2007-06-13 3:28 ` Matt Mackall
2007-06-13 9:21 ` Paul Mundt
2007-06-13 13:15 ` Matt Mackall
2007-06-13 22:47 ` Christoph Lameter
2007-06-14 2:43 ` Paul Mundt [this message]
2007-06-14 6:01 ` Christoph Lameter
2007-06-14 2:40 ` Paul Mundt
2007-06-14 6:00 ` Christoph Lameter
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=20070614024344.GB21749@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.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