From: Brian Gerst <bgerst@didntduck.org>
To: Tommy Reynolds <reynolds@redhat.com>
Cc: Eric Sandeen <sandeen@sgi.com>,
linux-kernel@vger.kernel.org, torvalds@transmeta.com,
marcelo@conectiva.com.br
Subject: Re: [PATCH] kmem_cache_zalloc()
Date: Wed, 03 Apr 2002 17:42:28 -0500 [thread overview]
Message-ID: <3CAB8554.1A94C077@didntduck.org> (raw)
In-Reply-To: <1017871982.25556.7.camel@stout.americas.sgi.com> <20020403162810.2c24ba60.reynolds@redhat.com>
Tommy Reynolds wrote:
>
> Uttered "Eric Sandeen" <sandeen@sgi.com>, spoke thus:
>
> > In short, we're using a kmem_cache_zalloc() function in XFS which just
> > does kmem_cache_alloc + memset.
> >
> > We'd like to incorporate this into the kernel proper, and several others
> > chimed in that it would be useful, so here's the patch. If it's a no-go
> > with you, we can roll this functionality back under fs/xfs to reduce our
> > changes in the mainline kernel.
>
> Why not use the constructor function interface to kmem_cache_create that is
> _already_ in the kernel API?
Constructors are only called once when the slab is allocated. It is
expected that objects are returned to the slab in the same state.
I think a better idea would be to add a flag to the cache that tells
kmem_cache_alloc() to zero out the object it allocates instead of
creating another interface.
--
Brian Gerst
prev parent reply other threads:[~2002-04-03 22:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-03 22:13 [PATCH] kmem_cache_zalloc() Eric Sandeen
2002-04-03 22:28 ` Tommy Reynolds
2002-04-03 22:42 ` Brian Gerst [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CAB8554.1A94C077@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=reynolds@redhat.com \
--cc=sandeen@sgi.com \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox