lkml.org 
[lkml]   [2005]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Run PCI driver initialization on local node
On Thu, 7 Jul 2005, Andi Kleen wrote:

> > The slab allocator will do the right thing with the numa slab allocator in
> > Andrew's tree but not with the one in Linus'tree. The one is Linus tree
> > will just pickup whatever slab is available irregardless of the node.
>
> It should usually do the right thing because it
> runs on the correct CPUs. The only case that doesn't work
> is freeing on different CPUs than it was allocated, but hopefully
> that is not too common during system startup.

The current slab wont do that unless you allocate enough entries so
that a new page is retrieved from the page allocator. Then you may have
local memory from the slab (if the memory policy is not on round robin).

If you allocate some slab entries on one node then you typically have a
partially used page from that node. If you then switch to a different
processor on a different node and then use the slab allocator to get an
entry for that slab then that partially used page will be used! The
slab allocator will return an entry from the *prior* node.

> And then at some point NUMA aware slab will make it into mainline > I guess.

Hopefully.

> > Only kmalloc_node will make a reasonable attempt to locate the memory on
> > a specific node.
>
> You forgot __get_free_pages.

The slab allocator uses alloc_pages and alloc_pages_node
-
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: 2005-07-07 16:00    [W:3.095 / U:0.892 seconds]
©2003-2014 Jasper Spaans. Advertise on this site