Re: No kmem_cache_destroy?

Andrea Arcangeli (andrea@suse.de)
Sun, 8 Aug 1999 01:01:21 +0200 (CEST)


On Sat, 7 Aug 1999, Steve Dodd wrote:

>Okay, I just snarfed that. Looks okay /to me/, with the obvious proviso that
>the sub-system calling it must make sure that nothing else is going to try
>to allocate or free memory using that cache (from another CPU, or interrupt
>handler). Oh, and better make sure nothing was sleeping in kmem_cache_grow()
>either..

Exactly.

>Mark, I've left you on the cc: list for this message; your comments in slab.c

I just cc'ed him in the original email as well (in february) so he should
be just uptodate (I had no feedback though).

>I can imagine in the future a situation where multiple modules might share
>a slab cache, in which case we'd want a use count, but there's no point in
>adding that until someone needs it.

That was my point. The common case is the kmem_cache_create in init_module
and kmem_cache_destroy in cleanup_module. I am not sure if it worth to do
the garbage collection thing suggested by Dave. We not are breaking the
old interface at all adding a new API. (but now you are allowed to do some
more thing if yoy want) The old code will continue to work of course since
the old code (obviously ;) don't need the new function.

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/