linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Paul Mundt <lethal@linux-sh.org>,
	Christoph Lameter <clameter@sgi.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: Tue, 12 Jun 2007 22:28:57 -0500	[thread overview]
Message-ID: <20070613032857.GN11115@waste.org> (raw)
In-Reply-To: <20070613031203.GB15009@linux-sh.org>

On Wed, Jun 13, 2007 at 12:12:03PM +0900, Paul Mundt wrote:
> Here's an updated copy of the patch adding simple NUMA support to SLOB,
> against the current -mm version of SLOB this time.
> 
> I've tried to address all of the comments on the initial version so far,
> but there's obviously still room for improvement.
> 
> This approach is not terribly scalable in that we still end up using a
> global freelist (and a global spinlock!) across all nodes, making the
> partial free page lookup rather expensive. The next step after this will
> be moving towards split freelists with finer grained locking.
> 
> The scanning of the global freelist could be sped up by simply ignoring
> the node id unless __GFP_THISNODE is set. This patch defaults to trying
> to match up the node id for the partial pages (whereas the last one just
> grabbed the first partial page from the list, regardless of node
> placement), but perhaps that's the wrong default and should only be done
> for __GFP_THISNODE?

Hmmm. There's not a whole lot that uses __GFP_THISNODE. Dunno.
 
> +static inline void *slob_new_page(gfp_t gfp, int order, int node)
> +{
> +	void *page;
> +
> +#ifdef CONFIG_NUMA
> +	if (node != -1)
> +		page = alloc_pages_node(node, gfp, order);
> +	else
> +#endif
> +		page = alloc_pages(gfp, order);
> +
> +	if (!page)
> +		return NULL;
> +
> +	return page_address(page);

We might want to leave the inlining decision here to the compiler. The
ifdef may change that decision..

> -void *__kmalloc(size_t size, gfp_t gfp)
> +static void *slob_node_alloc(size_t size, gfp_t gfp, int node)

See my comment in the last message.

-- 
Mathematics is the supreme nostalgia of our time.

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

  parent reply	other threads:[~2007-06-13  3:28 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 [this message]
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=20070613032857.GN11115@waste.org \
    --to=mpm@selenic.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-mm@kvack.org \
    --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