Re: [PATCH] (repost) kmem_cache_zalloc

Christoph Hellwig (hch@infradead.org)
Thu, 25 Apr 2002 09:41:43 +0100


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/