All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	mpm@selenic.com, npiggin@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Simple Slab: A slab allocator with minimal meta information
Date: Fri, 11 Aug 2006 22:33:24 +0200	[thread overview]
Message-ID: <44DCE994.4060102@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0608111014470.17885@schroedinger.engr.sgi.com>

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

  reply	other threads:[~2006-08-11 20:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10  0:52 [RFC] Simple Slab: A slab allocator with minimal meta information Christoph Lameter
2006-08-10  2:07 ` Matt Mackall
2006-08-10  5:01 ` KAMEZAWA Hiroyuki
2006-08-10  5:13   ` Christoph Lameter
2006-08-10  5:44     ` KAMEZAWA Hiroyuki
2006-08-10  5:44       ` Christoph Lameter
2006-08-10  5:56         ` KAMEZAWA Hiroyuki
2006-08-10  6:13       ` KAMEZAWA Hiroyuki
2006-08-10 15:25         ` Christoph Lameter
2006-08-10 18:47           ` Manfred Spraul
2006-08-10 18:52             ` Christoph Lameter
2006-08-11 17:21             ` Christoph Lameter
2006-08-11 20:33               ` Manfred Spraul [this message]
2006-08-11 21:02                 ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2006-08-14  1:10 linux
2006-08-14 11:47 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44DCE994.4060102@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.