From: David Rientjes on
On Tue, 3 Aug 2010, Christoph Lameter wrote:

> Index: linux-2.6/mm/slub.c
> ===================================================================
> --- linux-2.6.orig/mm/slub.c 2010-07-26 12:57:52.000000000 -0500
> +++ linux-2.6/mm/slub.c 2010-07-26 12:57:59.000000000 -0500
> @@ -1073,7 +1073,7 @@ static inline struct page *alloc_slab_pa
>
> flags |= __GFP_NOTRACK;
>
> - if (node == -1)
> + if (node == NUMA_NO_NODE)
> return alloc_pages(flags, order);
> else
> return alloc_pages_exact_node(node, flags, order);
> @@ -1387,7 +1387,7 @@ static struct page *get_any_partial(stru
> static struct page *get_partial(struct kmem_cache *s, gfp_t flags, int node)
> {
> struct page *page;
> - int searchnode = (node == -1) ? numa_node_id() : node;
> + int searchnode = (node == NUMA_NO_NODE) ? numa_node_id() : node;
>
> page = get_partial_node(get_node(s, searchnode));
> if (page || (flags & __GFP_THISNODE) || node != -1)

This has a merge conflict with 2.6.35 since it has this:

page = get_partial_node(get_node(s, searchnode));
if (page || (flags & __GFP_THISNODE))
return page;

return get_any_partial(s, flags);

so what happened to the dropped check for returning get_any_partial() when
node != -1? I added the check for benchmarking.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Christoph Lameter on
On Tue, 3 Aug 2010, David Rientjes wrote:

> > static struct page *get_partial(struct kmem_cache *s, gfp_t flags, int node)
> > {
> > struct page *page;
> > - int searchnode = (node == -1) ? numa_node_id() : node;
> > + int searchnode = (node == NUMA_NO_NODE) ? numa_node_id() : node;
> >
> > page = get_partial_node(get_node(s, searchnode));
> > if (page || (flags & __GFP_THISNODE) || node != -1)
>
> This has a merge conflict with 2.6.35 since it has this:
>
> page = get_partial_node(get_node(s, searchnode));
> if (page || (flags & __GFP_THISNODE))
> return page;
>
> return get_any_partial(s, flags);
>
> so what happened to the dropped check for returning get_any_partial() when
> node != -1? I added the check for benchmarking.

Strange no merge conflict here. Are you sure you use upstream?

GFP_THISNODE does not matter too much. If page == NULL then we failed
to allocate a page on a specific node and have to either give up (and then
extend the slab) or take a page from another node.

We always have give up to go to the page allocator if GFP_THIS_NODE was
set. The modification to additionally also go to the page allocator if
a node was just set even without GFP_THISNODE. So checking for
GFP_THISNODE does not make sense anymore.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Rientjes on
On Wed, 4 Aug 2010, Christoph Lameter wrote:

> > > static struct page *get_partial(struct kmem_cache *s, gfp_t flags, int node)
> > > {
> > > struct page *page;
> > > - int searchnode = (node == -1) ? numa_node_id() : node;
> > > + int searchnode = (node == NUMA_NO_NODE) ? numa_node_id() : node;
> > >
> > > page = get_partial_node(get_node(s, searchnode));
> > > if (page || (flags & __GFP_THISNODE) || node != -1)
> >
> > This has a merge conflict with 2.6.35 since it has this:
> >
> > page = get_partial_node(get_node(s, searchnode));
> > if (page || (flags & __GFP_THISNODE))
> > return page;
> >
> > return get_any_partial(s, flags);
> >
> > so what happened to the dropped check for returning get_any_partial() when
> > node != -1? I added the check for benchmarking.
>
> Strange no merge conflict here. Are you sure you use upstream?
>

Yes, 2.6.35 does not have the node != -1 check and Linus hasn't pulled
slub/fixes from Pekka's tree yet. Even when he does, "slub numa: Fix rare
allocation from unexpected node" removes the __GFP_THISNODE check before
adding node != -1, so this definitely doesn't apply to anybody else's
tree.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/