linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>,
	Matt Mackall <mpm@selenic.com>,
	Christoph Lameter <clameter@sgi.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH] slob: poor man's NUMA, take 2.
Date: Wed, 13 Jun 2007 13:23:06 +0900	[thread overview]
Message-ID: <20070613042306.GA15462@linux-sh.org> (raw)
In-Reply-To: <20070613041319.GA15328@linux-sh.org>

On Wed, Jun 13, 2007 at 01:13:19PM +0900, Paul Mundt wrote:
> On Wed, Jun 13, 2007 at 01:42:28PM +1000, Nick Piggin wrote:
> > OTOH, there are lots of places that don't specify the node explicitly,
> > but most of them prefer the allocation to come from the current node...
> > and that case isn't handled very well is it?
> > 
> Well, we could throw in a numa_node_id() for kmem_cache_alloc() and
> __kmalloc(), that would actually simplify slob_new_page(), since we can
> just use alloc_pages_node() directly in the NUMA case without special
> casing the node id.
> 
> This also has the side-effect of working well on UP with asymmetric nodes
> (assuming a larger node 0), since numa_node_id() will leave us with a
> node 0 preference in places where the node id isn't explicitly given.
> 
And sure enough, that's what alloc_pages_node() already does, so if
slob_new_page() simply wraps in to it it should already be handled:

static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
					    unsigned int order)
{
	...

	/* Unknown node is current node */
	if (nid < 0)
		nid = numa_node_id();
	...

I'll update the patch..

--
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>

  reply	other threads:[~2007-06-13  4:23 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 [this message]
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
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=20070613042306.GA15462@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