Hello, > But kmalloc() calls kmem_cache_alloc() in turn. So whether > you call kmalloc or kmem_cache_alloc it is getting allocated > from slab cache. Am I missing something here? > > When you use kmalloc() it walks a linear table looking for > the matching general cache. > > You can avoid this overhead by figuring out the general > cache that will be used at init time then feeding that > cachep directly to kmem_cache_alloc(). And also kmem_cache_alloc() have an advantage about hardware cache. kmem_cache_alloc() lets each objects use different cache line. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html