lkml.org 
[lkml]   [2006]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Simple Slab: A slab allocator with minimal meta information
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
system?
Anyway: The solution was the shared array. It allows to move objects
around with a simple memmove of the pointers, without the
list_del()/list_add() calls.

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

\
 
 \ /
  Last update: 2006-08-11 22:37    [W:0.446 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site