From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Nick Piggin <npiggin@suse.de>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
cl@linux-foundation.org
Subject: Re: [patch 2/2] slqb: dynamic array allocations
Date: Tue, 03 Feb 2009 16:27:20 +0200 [thread overview]
Message-ID: <1233671240.22926.60.camel@penberg-laptop> (raw)
In-Reply-To: <20090203140712.GB8723@wotan.suse.de>
Hi Nick,
On Tue, 2009-02-03 at 15:07 +0100, Nick Piggin wrote:
> It would be nice to keep this changeset in history if it gets merged upstream.
> I don't know for sure if there won't be a performance impact.
The 'topic/slqb/core' branch in slab.git is append-only so when you want
to merge this with Linus, we can always just ask him to pull. I don't
see much reason to fiddle with the history. After all, it's hidden under
a new config option so it's not like it's going to break git bisect or
anything.
On Tue, 2009-02-03 at 15:07 +0100, Nick Piggin wrote:
> Implement dynamic allocation for SLQB per-cpu and per-node arrays. This
> should hopefully have minimal runtime performance impact, because although
> there is an extra level of indirection to do allocations, the pointer should
> be in the cache hot area of the struct kmem_cache.
>
> It's not quite possible to use dynamic percpu allocator for this: firstly,
> that subsystem uses the slab allocator. Secondly, it doesn't have good
> support for per-node data. If those problems were improved, we could use it.
> For now, just implement a very very simple allocator until the kmalloc
> caches are up.
>
> On x86-64 with a NUMA MAXCPUS config, sizes look like this:
> text data bss dec hex filename
> 29960 259565 100 289625 46b59 mm/slab.o
> 34130 497130 696 531956 81df4 mm/slub.o
> 24575 1634267 111136 1769978 1b01fa mm/slqb.o
> 24845 13959 712 39516 9a5c mm/slqb.o + this patch
>
> SLQB is now 2 orders of magnitude smaller than it was, and an order of
> magnitude smaller than SLAB or SLUB (in total size -- text size has
> always been smaller). So it should now be very suitable for distro-type
> configs in this respect.
I think Christoph's percpu allocator is supposed to fix it up for SLUB.
We can probably switch SLQB over as well when that work hits mainline.
On Tue, 2009-02-03 at 15:07 +0100, Nick Piggin wrote:
> As a side-effect the UP version of cpu_slab (which is embedded directly
> in the kmem_cache struct) moves up to the hot cachelines, so it need no
> longer be cacheline aligned on UP. The overall result should be a
> reduction in cacheline footprint on UP kernels.
>
> Signed-off-by: Nick Piggin <npiggin@suse.de>
Applied, thanks!
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-02-03 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 13:55 [patch 1/2] slqb: fix small zero size alloc bug Nick Piggin
2009-02-03 14:07 ` [patch 2/2] slqb: dynamic array allocations Nick Piggin
2009-02-03 14:27 ` Pekka Enberg [this message]
2009-02-03 14:24 ` [patch 1/2] slqb: fix small zero size alloc bug Pekka Enberg
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=1233671240.22926.60.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=andi@firstfloor.org \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=yanmin_zhang@linux.intel.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