lkml.org 
[lkml]   [2002]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] (repost) kmem_cache_zalloc
From
Date
Hi Christoph - 

On Thu, 2002-04-25 at 03:41, Christoph Hellwig wrote:

> 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.

The constructor is one part of it, but what about more efficient memory
use? If we let things fall into the default power-of-two caches, we'd
waste quite a lot of memory.

See http://oss.sgi.com/~sandeen/slabinfo.html for example.

On this machine we'd use 30% more memory by using kmem_alloc vs
kmem_cache_alloc.

-Eric

--
Eric Sandeen XFS for Linux http://oss.sgi.com/projects/xfs
sandeen@sgi.com SGI, Inc.

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.057 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site