[PATCH,RFC] per-cpu slab

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Tue Jun 06 2000 - 13:51:38 EST


I've uploaded an beta version of my per-cpu slab allocator.

Main ideas:
* use an array to store the per-cpu data: alloc & free are very simple,
I can avoid searching the associated control block during free.
* if the per-cpu array overflows, then perform multiple allocs/frees
with one spin_lock operation.
* only objects <= PAGE_SIZE are cached in the per-cpu caches, the larger
objects are too expensive.
* use smp_call_function to drain the per-cpu structures during
kmem_cache_destroy.
* the uniprocessor version didn't change.

TODO:
* docu update
* verify & stress test the SMP code.
* test UP: it doesn't even compile...
* dcache.c calls kmem_cache_shrink very often, perhaps the
smp_call_function should be removed from kmem_cache_shrink (drain
per-cpu array only during kmem_cache_destroy).

The patch is ~ 85 kB long, I've uploaded it to

        http://colorfullife.com/~manfreds/slab/patch-slab-cpu-A

--
	Manfred

- 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/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:26 EST