Re: [CFT] kmem_cache_alloc_node

From: Zwane Mwaikambo
Date: Sat Nov 29 2003 - 12:15:28 EST


On Sat, 29 Nov 2003, Manfred Spraul wrote:

I've written a prototype kmem_cache_alloc_node function: I'm not yet
convinced that it's really necessary to guarantee that kmalloc and
kmem_cache_alloc are strictly node-local (adds noticable costs to the
hot paths, and many objects will be touched by multiple nodes anyway),
but at least the cpu bound data structures should be allocated from the
right node.
The attached patch adds a simple kmem_cache_alloc_node function and
moves the cpu local structures within slab onto the right node.
One problem is the bootstrap: there is an
alloc_pages_node(,,cpu_to_node()) during CPU_UP_PREPARE: Does that work,
or is that too early?
Please test it, I don't have access to suitable hardware.

The patch also includes fixes for two accounting bugs in error paths,
I'll send them seperately to Andrew.

Hi Manfred,
I just booted this patch on a 4 quad NUMAQ successfully, this was
only a test boot, i'll get around to having a closer look a bit later on.

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