[lkml]   [2005]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectFix broken kmalloc_node in rc1/rc2
This patch used to be in Andrew's tree before the NUMA slab allocator went 
in. Either this patch or the NUMA slab allocator is needed in order for
kmalloc_node to work correctly.

pcibus_to_node may be used to generate the node information passed to
kmalloc_node. pcibus_to_node returns -1 if it was not able to determine
on which node a pcibus is located. For that case kmalloc_node must
work like kmalloc.

Signed-off-by: Christoph Lameter <>

Index: linux-2.6.13-rc2/mm/slab.c
--- linux-2.6.13-rc2.orig/mm/slab.c 2005-07-06 03:46:33.000000000 +0000
+++ linux-2.6.13-rc2/mm/slab.c 2005-07-06 17:34:19.000000000 +0000
@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t
struct slab *slabp;
kmem_bufctl_t next;

+ if (nodeid == -1)
+ return kmem_cache_alloc(cachep, flags);
for (loop = 0;;loop++) {
struct list_head *q;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-07-07 04:24    [W:0.031 / U:33.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site