On 09/27/2012 12:18 AM, Christoph Lameter wrote: > SLOB has no support for an array of kmalloc caches. Create a section > in include/linux/slab.h that is dedicated to the kmalloc cache > definition but disabled if SLOB is selected. > > slab_common.c also has functions that are not needed for slob. > Disable those as well. > > Signed-off-by: Christoph Lameter <cl@xxxxxxxxx> > > Index: linux/mm/slab_common.c > =================================================================== > --- linux.orig/mm/slab_common.c 2012-09-18 12:13:16.230754925 -0500 > +++ linux/mm/slab_common.c 2012-09-18 12:16:28.354706953 -0500 > @@ -218,6 +218,8 @@ int slab_is_available(void) > return slab_state >= UP; > } > > +#ifndef CONFIG_SLOB > + > /* Create a cache during boot when no slab services are available yet */ > void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t size, > unsigned long flags) I don't see why you can't fold this directly in the patch where those things are created. > @@ -249,3 +251,5 @@ struct kmem_cache *__init create_kmalloc > s->refcount = 1; > return s; > } > + > +#endif /* !CONFIG_SLOB */ > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@xxxxxxxxx. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a> > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>