From: Neil Brown <neilb@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SLUB: kmem_cache_destroy doesn't - version 2.
Date: Mon, 23 Apr 2007 16:44:36 +1000 [thread overview]
Message-ID: <17964.21972.961812.744601@notabene.brown> (raw)
In-Reply-To: message from Christoph Lameter on Thursday April 19
On Thursday April 19, clameter@sgi.com wrote:
>
> Right. Sigh. But there is no user of the symlinks.
>
> I could drop the symlinks completely. Just do not track what names a cache
> aliases to?
>
Suppose I have a kmem_cache which at different times has different
sizes (like, for example, the cache used for 'stripe_head' in
md/raid5.c. If I 'grow' and array, I resize that kmem_cache).
Suppose that the first time I create it, it has size X, and then
someone else creates a cache with size X. The second cache will become
an alias for the first. So when the first is destroyed, the name
says.
Now I try to create another cache with the same name (it is serving
the same purpose) but with a different size. It will need to create a
new cache, but the name is still in use. Bang!
I really think you need to return a different handle to each
kmem_cache_create call so that you know which cache is being deleted
so you can mangle names correctly.
Another option might be to name each cache actually created with a
unique name, and then create a symlink for each cache that was asked
for (whether it was created or whether a pre-existing cache was used).
Then being lazy about deletion shouldn't be a problem.
NeilBrown
next prev parent reply other threads:[~2007-04-23 6:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 4:28 Neil Brown
2007-04-20 5:18 ` Christoph Lameter
2007-04-20 5:35 ` Neil Brown
2007-04-20 5:38 ` Christoph Lameter
2007-04-20 5:51 ` Christoph Lameter
2007-04-23 6:44 ` Neil Brown [this message]
2007-04-23 6:48 ` Christoph Lameter
2007-04-23 20:49 ` Christoph Lameter
2007-04-24 0:34 ` Neil Brown
2007-04-24 0:42 ` Christoph Lameter
2007-04-24 0:50 ` Neil Brown
2007-04-24 1:06 ` Christoph Lameter
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=17964.21972.961812.744601@notabene.brown \
--to=neilb@suse.de \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®