From: Andi Kleen <ak@suse.de>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Christoph Lameter <clameter@sgi.com>, Andi Kleen <ak@muc.de>,
mpm@selenic.com, Marcelo Tosatti <marcelo@kvack.org>,
linux-kernel@vger.kernel.org,
Nick Piggin <nickpiggin@yahoo.com.au>, Dave Chinner <dgc@sgi.com>
Subject: Re: [MODSLAB 3/7] A Kmalloc subsystem
Date: Thu, 17 Aug 2006 13:42:38 +0200 [thread overview]
Message-ID: <200608171342.39308.ak@suse.de> (raw)
In-Reply-To: <44E3FC4F.2090506@colorfullife.com>
On Thursday 17 August 2006 07:19, Manfred Spraul wrote:
> Christoph Lameter wrote:
> >On Wed, 16 Aug 2006, Andi Kleen wrote:
> >>>2. use fls to calculate array position.
> >>
> >>I'm not sure that's a good idea. I always had my doubts that power of
> >> twos are a good size distribution. I remember the original slab paper
> >> from Bonwick also discouraged them. With fls you would hard code it.
> >
> >The original paper from Bonwick is pretty dated now. There are some
> >interesting ideas in there and we have mostly followed them. But it is an
> >academic paper after all.
>
> It's not just an academic paper, it's implemented in Solaris. Check the
> opensolaris sources.
If you watch some allocation size traces then it's not clear power of two
is really a good fit.
>
> > So not all ideas may be relevant in practice.
> >Support for non power of two sizes could lead to general slabs that do not
> >exactly fit into one page.
>
> That's a good thing.
> I'm not sure that the current approach with
> virt_to_page()/vmalloc_to_page() is the right thing(tm): Both functions
> are slow.
> If you have non-power-of-two caches, you could store the control data at
> (addr&(~PAGE_SIZE)) - the lookup would be much faster. I wrote a patch a
> few weeks ago, it's attached.
For networking it might be useful. For it the allocator is quite performance
critical and the common case for large objects is 1.5k+sizeof(skb_shared_info)
MTU sized packets. This would need a new
At some point I had a hack to hint to the slab allocator about MTU
sizes of network interfaces, but I dropped it because it didn't seem
useful without anything else to store in a page (2K objects vs 1.5k
objects still only fit two per page)
But if you have metadata you could use it. Drawback even more
complexity because you have another special case?
-Andi
next prev parent reply other threads:[~2006-08-17 10:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 2:22 [MODSLAB 0/7] A modular slab allocator V1 Christoph Lameter
2006-08-16 2:22 ` [MODSLAB 1/7] Extract allocpercpu from Slab Christoph Lameter
2006-08-16 2:22 ` [MODSLAB 2/7] Allocator Framework and misc features Christoph Lameter
2006-08-16 2:22 ` [MODSLAB 3/7] A Kmalloc subsystem Christoph Lameter
2006-08-16 7:43 ` Andi Kleen
2006-08-17 0:24 ` Christoph Lameter
2006-08-17 5:19 ` Manfred Spraul
2006-08-17 11:42 ` Andi Kleen [this message]
2006-08-17 16:26 ` Christoph Lameter
2006-08-19 7:08 ` Manfred Spraul
2006-08-19 16:46 ` Christoph Lameter
2006-08-19 18:54 ` Manfred Spraul
2006-08-19 19:17 ` Christoph Lameter
2006-08-18 6:17 ` Christoph Lameter
2006-08-18 7:17 ` KAMEZAWA Hiroyuki
2006-08-18 16:58 ` Christoph Lameter
2006-08-18 18:19 ` KAMEZAWA Hiroyuki
2006-08-18 18:44 ` Christoph Lameter
2006-08-18 19:13 ` KAMEZAWA Hiroyuki
2006-08-18 19:19 ` Christoph Lameter
2006-08-16 2:22 ` [MODSLAB 4/7] Slabulator: Emulate the existing Slab Layer Christoph Lameter
2006-08-16 2:23 ` [MODSLAB 5/7] A slab allocator: SLABIFIER Christoph Lameter
2006-08-16 2:23 ` [MODSLAB 6/7] A slab allocator: NUMA Slab allocator Christoph Lameter
2006-08-16 2:23 ` [MODSLAB 7/7] A slab allocator: Page " Christoph Lameter
2006-08-16 7:52 ` [MODSLAB 0/7] A modular slab allocator V1 Andi Kleen
2006-08-16 8:41 ` Matt Mackall
2006-08-16 9:38 ` David Chinner
2006-08-16 15:08 ` Christoph Lameter
2006-08-16 15:05 ` Christoph Lameter
2006-08-16 8:12 ` David Chinner
2006-08-16 8:32 ` Andi Kleen
2006-08-16 9:18 ` David Chinner
2006-08-16 15:06 ` Christoph Lameter
2006-08-16 16:15 ` Manfred Spraul
2006-08-16 21:49 ` Christoph Lameter
2006-08-16 22:16 ` Christoph Lameter
2006-08-16 22:34 ` Christoph Lameter
2006-08-16 22:45 ` Christoph Lameter
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=200608171342.39308.ak@suse.de \
--to=ak@suse.de \
--cc=ak@muc.de \
--cc=clameter@sgi.com \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=marcelo@kvack.org \
--cc=mpm@selenic.com \
--cc=nickpiggin@yahoo.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox