The patch titled add slab_is_available() routine for boot code has been added to the -mm tree. Its filename is add-slab_is_available-routine-for-boot-code.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Mike Kravetz <kravetz@xxxxxxxxxx> slab_is_available() indicates slab based allocators are available for use. SPARSEMEM code needs to know this as it can be called at various times during the boot process. Signed-off-by: Mike Kravetz <kravetz@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/slab.h | 1 + mm/slab.c | 8 ++++++++ mm/sparse.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff -puN include/linux/slab.h~add-slab_is_available-routine-for-boot-code include/linux/slab.h --- devel/include/linux/slab.h~add-slab_is_available-routine-for-boot-code 2006-05-10 15:49:23.000000000 -0700 +++ devel-akpm/include/linux/slab.h 2006-05-10 15:49:23.000000000 -0700 @@ -150,6 +150,7 @@ static inline void *kcalloc(size_t n, si extern void kfree(const void *); extern unsigned int ksize(const void *); +extern int slab_is_available(void); #ifdef CONFIG_NUMA extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node); diff -puN mm/slab.c~add-slab_is_available-routine-for-boot-code mm/slab.c --- devel/mm/slab.c~add-slab_is_available-routine-for-boot-code 2006-05-10 15:49:23.000000000 -0700 +++ devel-akpm/mm/slab.c 2006-05-10 15:49:23.000000000 -0700 @@ -700,6 +700,14 @@ static enum { FULL } g_cpucache_up; +/* + * used by boot code to determine if it can use slab based allocator + */ +int slab_is_available(void) +{ + return g_cpucache_up == FULL; +} + static DEFINE_PER_CPU(struct work_struct, reap_work); static void free_block(struct kmem_cache *cachep, void **objpp, int len, diff -puN mm/sparse.c~add-slab_is_available-routine-for-boot-code mm/sparse.c --- devel/mm/sparse.c~add-slab_is_available-routine-for-boot-code 2006-05-10 15:49:23.000000000 -0700 +++ devel-akpm/mm/sparse.c 2006-05-10 15:49:23.000000000 -0700 @@ -32,7 +32,7 @@ static struct mem_section *sparse_index_ unsigned long array_size = SECTIONS_PER_ROOT * sizeof(struct mem_section); - if (system_state == SYSTEM_RUNNING) + if (slab_is_available()) section = kmalloc_node(array_size, GFP_KERNEL, nid); else section = alloc_bootmem_node(NODE_DATA(nid), array_size); _ Patches currently in -mm which might be from kravetz@xxxxxxxxxx are origin.patch add-slab_is_available-routine-for-boot-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html