Re: [PATCH] (repost) kmem_cache_zalloc

From: Christoph Hellwig (hch@infradead.org)
Date: Thu Apr 25 2002 - 03:41:43 EST


On Wed, Apr 24, 2002 at 04:07:52PM -0500, Eric Sandeen wrote:
> (reposting)
>
> There was a brief thread on this patch a while ago, please see
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0203.3/0601.html
>
> In short, XFS is using a kmem_cache_zalloc() function which just
> does kmem_cache_alloc + memset.

Hi Eric,

I don't think kmem_cache_zalloc is a good idea. The idea behind the slab
cache is to allow object reuse by storing constructed objects in the
caches, and a memset directly after the alloc destroys the object state.
A kmen_zalloc/kzalloc might make more sense.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:10 EST