add kmem_cache_alloc_node
Subsystems (3)
PATCH 1/1 add kmem_cache_alloc_node
Hi Andrew,
the attached patch adds a simple kmem_cache_alloc_node function: allocate memory on a given node. The function is intended for cpu bound structures. It's used for alloc_percpu and for the slab-internal per-cpu structures. Jack Steiner reported a ~3% performance increase for AIM7 on a 64-way Itanium 2.
Andrew, could you add it to your -mm tree?
Port maintainers: The patch could cause problems if CPU_UP_PREPARE is called for a cpu on a node before the corresponding memory is attached and/or if alloc_pages_node doesn't fall back to memory from another node if there is no memory in the requested node. I think noone does that, but I'm not sure.
--
Manfred
// $Header$
// Kernel Version:
// VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 6 // EXTRAVERSION = -mm2
include/linux/slab.h +1 -0
@@ -61,6 +61,7 @@extern int kmem_cache_destroy (kmem_cache_t *);extern int kmem_cache_shrink (kmem_cache_t *);extern void *kmem_cache_alloc (kmem_cache_t *,int ); +extern void *kmem_cache_alloc_node (kmem_cache_t *,int );extern void kmem_cache_free (kmem_cache_t *,void *);extern unsigned int kmem_cache_size (kmem_cache_t *);
mm/slab.c +148 -51
277 lines not on this page · raw message