[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1265206946.2118.57.camel@localhost>
Date: Wed, 03 Feb 2010 14:22:26 +0000
From: Richard Kennedy <richard@....demon.co.uk>
To: Christoph Lameter <cl@...ux-foundation.org>,
penberg <penberg@...helsinki.fi>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Cc: lkml <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>
Subject: [RFC] slub: ARCH_SLAB_MINALIGN defaults to 8 on x86_32. is this
too big?
Hi all,
slub.c sets the default value of ARCH_SLAB_MINALIGN to sizeof(unsigned
long long) if the architecture didn't already override it.
And as x86_32 doesn't set a value this means that slab objects get
aligned to 8 bytes, potentially wasting 4 bytes per object. Slub forces
objects to be aligned to sizeof(void *) anyway, but I don't see that
there is any need for it to be 8 on 32bits.
I'm working on a patch to pack more buffer_heads into each kmem_cache
slab page.
On 32 bits the structure size is 52 bytes and with the alignment applied
I end up with a slab of 73 x 56 byte objects. However, if the minimum
alignment was sizeof(void *) then I'd get 78 x 52 byte objects. So there
is quite a memory saving to be had in changing this.
Can I define a ARCH_SLAB_MINALIGN in x86_64 to sizeof(void *) ?
or would it be ok to change the default in slub.c to sizeof(void *) ?
Or am I missing something ?
regards
Richard
--
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