lkml.org 
[lkml]   [2007]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] slob: poor man's NUMA support.
On 6/26/07, Christoph Lameter <clameter@sgi.com> wrote:
> 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.

What would break by changing, in alloc_pages_node()

if (nid < 0)
nid = numa_node_id();

to

if (nid < 0)
return alloc_pages_current(gfp_mask, order);

beyond needing to make alloc_pages_current() defined if !NUMA too.

Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-26 21:07    [W:0.058 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site