[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0706261112380.18010@schroedinger.engr.sgi.com>
Date: Tue, 26 Jun 2007 11:14:18 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Paul Mundt <lethal@...ux-sh.org>, Matt Mackall <mpm@...enic.com>,
Nick Piggin <nickpiggin@...oo.com.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slob: poor man's NUMA support.
On Tue, 26 Jun 2007, Andrew Morton wrote:
> > +#ifdef CONFIG_NUMA
> > + if (node != -1)
> > + page = alloc_pages_node(node, gfp, order);
> > + else
> > +#endif
> > + page = alloc_pages(gfp, order);
>
> Isn't the above equivalent to a bare
>
> page = alloc_pages_node(node, gfp, order);
>
> ?
No. alloc_pages follows memory policy. alloc_pages_node does not. One of
the reasons that I want a new memory policy layer are these kinds of
strange uses.
>
> if (node < 0
>
> rather than comparing with -1 exactly.
>
> On many CPUs it'll save a few bytes of code.
-1 means no node specified and much of the NUMA code compares with -1.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists