Messages in this thread | | | Subject | Re: [patch] real fix [Re: [patch] fixed 2.2.1 inode-leakage due bogus design of the free_inodes algorithm | Date | Thu, 11 Feb 1999 13:43:56 +0200 (EET) | From | Matti Aarnio <> |
| |
Andrea Arcangeli <andrea@e-mind.com> replied: > On Thu, 11 Feb 1999, Alexander Viro wrote: > > BTW, is there a decent way to create a cache from module? slabs > > EXPORT_SYMBOL(kmem_find_general_cachep); > EXPORT_SYMBOL(kmem_cache_create); > EXPORT_SYMBOL(kmem_cache_shrink); > EXPORT_SYMBOL(kmem_cache_alloc); > EXPORT_SYMBOL(kmem_cache_free); > > Looking at ksyms.c it seems just possible. I can't check better (more than > look at ksyms.c) right now, but if you get in problems in doing that drop > me a note and I'll take a better look soon.
Yes and No. kmem_cache_create() FAILS if the named cache exists. However there is no kmem_cache_delete() which would used to remove some module related cache... (IP*/TCP comes to my mind as an example needing it.)
I have tried to resort to such esoteric tricks as having separate permanently loaded submodule that just allocates the damn cache.. Please add that kmem_cache_delete() routine, and the world will be better place to be.
> Andrea Arcangeli
/Matti Aarnio <matti.aarnio@sonera.fi>
- 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/
| |