lkml.org 
[lkml]   [2007]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: SLUB: kmem_cache_destroy doesn't - version 2.
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
-
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: 2007-04-23 08:47    [W:0.051 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site