[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2y5jarl4k.fsf@firstfloor.org>
Date: Sat, 13 Oct 2012 16:46:19 -0700
From: Andi Kleen <andi@...stfloor.org>
To: Richard Kennedy <richard@....demon.co.uk>
Cc: Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>,
Matt Mackall <mpm@...enic.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] RFC SLUB: increase range of kmalloc slab sizes
Richard Kennedy <richard@....demon.co.uk> writes:
> This patch increases the range of slab sizes available to kmalloc, adding
> slabs half way between the existing power of two sized ones, so allowing slightly
> more efficient use of memory.
> Most of the new slabs already exist as kmem_cache slabs so only the 1.5k,3k & 6k
> are entirely new.
I'm not sure what order slab/slub use by default these days, but for
order 0 none of your new sizes sound like a winner:
4K / 1.5 = 2 = 4K / 2K
4K / 3K = 1 = 4K / 4K
8K / 6K = 1 = 8K / 8K
I think you need better data that it actually saves memory with some
reproducible workloads.
Revisiting the sizes is a good idea -- the original Bonwick slab paper
explicitely recommended against power of twos -- but I think it needs a
more data driven process to actually select better ones than what you
used.
Most likely the best fits are different between 32bit and 64bit
and also will change occasionally as kernel data structures grow
(or rarely shrink)
In fact I suspect it would be an interesting option for feedback
control for embedded kernels - measure workload, reboot/recompile with
slab fitting the workload well.
So I think before trying any of this you need a good slab profiler
and a good set of workloads.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists