Re: [PATCH] ext2/ext3: allocate ->s_blockgroup_lock separately toavoid wasting space

From: Peter Zijlstra
Date: Sun Nov 16 2008 - 07:58:48 EST


On Fri, 2008-11-14 at 11:17 +0200, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
>
> As spotted by kmemtrace, struct ext2_sb_info is 17024 bytes and ext3_sb_info is
> 17152 bytes on 64-bit which makes them a very bad fit for SLAB allocators. In
> fact, both allocations are round up to the next available page size of
> order 3 which is 32 KB.
>
> The culprit if the wasted memory is the ->s_blockgroup_lock which can be as big
> as 16 KB when CONFIG_NR_CPUS is set to 32. As struct blockgroup_lock is a
> perfect fit for order 2 page in the worst case, allocate ->s_blockgroup_lock
> separately to avoid wasting space.

And here I was thinking that NR_CPUS=4096 is currently our worst
case ;-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/