From: Andi Kleen <ak@suse.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andreas Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org, Eric Dumazet <dada1@cosmosbay.com>,
Denis Vlasenko <vda@ilport.com.ua>,
Matt Mackall <mpm@selenic.com>, Dave Jones <davej@redhat.com>
Subject: Re: [POLL] SLAB : Are the 32 and 192 bytes caches really usefull on x86_64 machines ?
Date: Thu, 29 Dec 2005 22:16:38 +0100 [thread overview]
Message-ID: <20051229211638.GL11515@wotan.suse.de> (raw)
In-Reply-To: <1135885721.6039.32.camel@localhost.localdomain>
> OK then, after reading this I figured there must be a way to dynamically
> allocate slab sizes based on the kmalloc constants. So I spent last
> night and some of this morning coming up with the below patch.
The canonical slab theory is that constant allocations are for fixed
objects. And if they are frequent they should be in theory kmem
cache because in theory their object live times should be similar
and clustering them together should give the best fragmentation
advoidance.
So in theory longer term the dynamic kmallocs are more important because
they cannot be handled like this - and these are not caught by
your patch.
So I'm not sure you're optimizing the right thing here.
Perhaps a good evolution your patch would be to add some analysis of
the callers and generate a nice compile time report that people can use as a
guideline to convert kmalloc over the kmem_cache_alloc. But to do this really
well would require dynamic data from runtime.
Given that I think a runtime patch is better. Ideally one that's easy
to use with someone collecting data from users and then submitting a patch
for a better new set of default slabs. Would need to be separate
for 32bit and 64bit too.
I guess one could run a fancy dynamic optimization algorithm to find
the best set of slabs from the data.
-Andi
next prev parent reply other threads:[~2005-12-29 21:16 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 8:00 [ANNOUNCE] GIT 1.0.0 Junio C Hamano
2005-12-21 9:11 ` [POLL] SLAB : Are the 32 and 192 bytes caches really usefull on x86_64 machines ? Eric Dumazet
2005-12-21 9:22 ` David S. Miller
2005-12-21 10:03 ` Jan-Benedict Glaw
2005-12-21 9:46 ` Alok kataria
2005-12-21 12:44 ` Ed Tomlinson
2005-12-21 13:20 ` Folkert van Heusden
2005-12-21 13:38 ` Eric Dumazet
2005-12-21 14:09 ` Folkert van Heusden
2005-12-21 16:40 ` Dave Jones
2005-12-21 19:36 ` Folkert van Heusden
2005-12-28 8:32 ` Denis Vlasenko
2005-12-28 8:54 ` Denis Vlasenko
2005-12-28 17:57 ` Andreas Kleen
2005-12-28 21:01 ` Matt Mackall
2005-12-29 1:26 ` Dave Jones
2005-12-30 4:06 ` Steven Rostedt
2006-01-02 8:46 ` Pekka Enberg
2006-01-02 8:51 ` Pekka Enberg
2006-01-02 12:33 ` Steven Rostedt
2006-01-02 12:31 ` Steven Rostedt
2005-12-29 1:29 ` Dave Jones
2005-12-29 1:50 ` Keith Owens
2005-12-29 2:39 ` Dave Jones
2006-01-02 15:03 ` Helge Hafting
2006-01-04 5:26 ` Dave Jones
2005-12-30 21:13 ` Marcelo Tosatti
2005-12-31 20:13 ` Andi Kleen
2005-12-29 19:48 ` Steven Rostedt
2005-12-29 21:16 ` Andi Kleen [this message]
2006-01-02 8:37 ` Pekka Enberg
2006-01-02 12:45 ` Andi Kleen
2006-01-02 13:04 ` Pekka J Enberg
2006-01-02 13:56 ` Andi Kleen
2006-01-02 15:09 ` Pekka J Enberg
2006-01-02 15:46 ` Jörn Engel
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=20051229211638.GL11515@wotan.suse.de \
--to=ak@suse.de \
--cc=dada1@cosmosbay.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=rostedt@goodmis.org \
--cc=vda@ilport.com.ua \
/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
Powered by JetHome