Re: [RFC] Simple Slab: A slab allocator with minimal meta information
From: Manfred Spraul
Date: Fri Aug 11 2006 - 16:31:42 EST
Christoph Lameter wrote:
I still do not get the role of the shared cache though.The shared cache is just for efficient object transfers:
Think about two nics, both cpu bound, one does rx, the other does tx.
Result: a few 100k kmalloc, kmem_cache_alloc(skb_head_cache) calls each
second on cpu1.
the same number of kfree, kmem_cache_free(skb_head_cache) calls each
second on cpu 2.
What is needed is an efficient algorithm for transfering all objects
from cpu 2 to cpu 1.
Initially, the slab allocator just had the cpu cache. Thus an object
transfer was a free_block call: add the freed object to the bufctl
linked list. Move the slab to the tail of the partial list. Probably the
list_del()/list_add() calls caused cache line trashing, but I don't
remember the details. IIRC Robert Olsson did the test. Pentium III Xeon
Anyway: The solution was the shared array. It allows to move objects
around with a simple memmove of the pointers, without the
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/