Messages in this thread | | | Date | Thu, 11 Feb 1999 11:43:27 +0000 (GMT) | From | Mark Hemment <> | Subject | Re: [patch] real fix [Re: [patch] fixed 2.2.1 inode-leakage due bogus design of the free_inodes algorithm |
| |
Alexander,
On Thu, 11 Feb 1999, Alexander Viro wrote: > BTW, is there a decent way to create a cache from module? slabs > want permanent storage, if I've parsed the comment in mm/slab.c right. I > really need it for clean rewrite of FAT-derived stuff (cache for directory > entries in FAT sense; that would solve all problems with bogus inumbers).
Slab caches cannot be destroyed, but they can be shrunk (kmem_cache_shrink()). There were too many conditions to be handed to allow destroying (extra, protective, locking in performance critical code paths). For modules, my thoughts were that only the cache ptrs (kmem_cache_t *) would need to always be resident. When a module is loaded it would check its cache ptrs (against NULL) to see if they needed creating. On unload, it shrinks the caches.
I know the Slab allocator needs a clean-up. I'm working on a replacment, which has per-engine (per-cpu) lists fronting the back SLABS (this is for SMP performance, and ensures re-use of the most likely h/w cache hot object). Being able to remove a cache entirely is on my list of features.
Mark
- 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/
| |