From: Manfred Spraul <manfred@colorfullife.com>
To: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
torvalds@transmeta.com, andrea@suse.de
Subject: Purpose of the mm/slab.c changes
Date: Sun, 09 Sep 2001 13:05:34 +0200 [thread overview]
Message-ID: <3B9B4CFE.E09D6743@colorfullife.com> (raw)
What's the purpose of the mm/slab.c changes?
Linus, Alan, could you please drop them. Switching from 1 list to 3
lists is just a slowdown.
2.4.9 2.4.9-ac9
km(1) 0x87 0x89
kf(1) 0xa9 0xa8
kf(cachep, 1) 0xad 0xad
km(4096) 0x7B 0x87 (+24% without overhead!)
kf(4096) 0xcB 0xd1
kf(cachep,4096) 0xcc 0xd3
(cpu ticks on a Duron 700, UP kernel, 100 calls in a tight loop, loop
overhead (0x49) not removed)
Benchmarking with SMP kernel is meaningless, since the actual list
changes are outside of the hot path - I did it, and the differences are
negligable (+-1 cpu tick)
And this is a benchmark with 100 calls in a tight loop - Andrea's patch
adds several additional branches, in real-world there would be an even
larger slowdown.
If there are real performance problems with the slab, then the not-yet
optimized parts should get changed:
* kmalloc(): the loop to find the correct slab is too slow. (the numbers
in the table are without the loop, i.e.
kmem_cache_alloc(kmem_find_general_cache(4096, SLAB_KERNEL),
SLAB_KERNEL);
* finetune the size of the per-cpu caches
* finetune the amount of pages freed during kmem_cache_reap()
* replace the division in kmem_cache_free_one() with a multiplication.
(UP only, on SMP outside of the hot path)
* enable OPTIMIZE - could help on platforms without a fast
virt_addr->struct page lookup.
I have a patch with some optimization, but I tought that would be 2.5
stuff.
--
Manfred
next reply other threads:[~2001-09-09 11:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-09 11:05 Manfred Spraul [this message]
2001-09-09 14:26 ` Purpose of the mm/slab.c changes Andrea Arcangeli
2001-09-09 15:18 ` Manfred Spraul
2001-09-09 15:33 ` Andrea Arcangeli
2001-09-11 18:41 ` Manfred Spraul
2001-09-11 19:36 ` Andrea Arcangeli
2001-09-11 20:43 ` Manfred Spraul
2001-09-12 14:18 ` Andrea Arcangeli
2001-09-09 16:12 ` Alan Cox
2001-09-09 16:25 ` Linus Torvalds
2001-09-09 16:47 ` Alan Cox
2001-09-09 16:55 ` Manfred Spraul
2001-09-09 17:01 ` Linus Torvalds
2001-09-09 17:22 ` Manfred Spraul
2001-09-09 17:27 ` arjan
2001-09-09 17:35 ` Andrea Arcangeli
2001-09-09 17:30 ` Andrea Arcangeli
2001-09-09 17:59 ` Fwd: 2.4.10-pre6 ramdisk driver broken? won't compile Stephan Gutschke
2001-09-09 20:26 ` Purpose of the mm/slab.c changes Rik van Riel
2001-09-15 0:29 ` Albert D. Cahalan
2001-09-09 20:23 ` Rik van Riel
2001-09-09 20:44 ` Davide Libenzi
2001-09-09 20:45 ` Rik van Riel
2001-09-09 20:58 ` Davide Libenzi
2001-09-22 12:28 ` Ralf Baechle
2001-09-22 21:03 ` Davide Libenzi
2001-09-22 21:36 ` David S. Miller
2001-09-10 2:28 ` Daniel Phillips
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=3B9B4CFE.E09D6743@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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