From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-ext4@vger.kernel.org, cl@linux-foundation.org,
mpm@selenic.com, eduard.munteanu@linux360.ro
Subject: Re: [PATCH] ext2/ext3: allocate ->s_blockgroup_lock separately to avoid wasting space
Date: Mon, 17 Nov 2008 23:27:47 +0200 [thread overview]
Message-ID: <4921E1D3.8040700@cs.helsinki.fi> (raw)
In-Reply-To: <1226840289.8172.8.camel@lappy.programming.kicks-ass.net>
Peter Zijlstra wrote:
> On Fri, 2008-11-14 at 11:17 +0200, Pekka J Enberg wrote:
>> From: Pekka Enberg <penberg@cs.helsinki.fi>
>>
>> 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 ;-)
Sure but look at <linux/blockgroup_lock.h>. NR_BG_LOCKS is capped to 128
for >= 32 CPUs.
prev parent reply other threads:[~2008-11-17 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-14 9:17 [PATCH] ext2/ext3: allocate ->s_blockgroup_lock separately to avoid wasting space Pekka J Enberg
2008-11-14 21:26 ` Andreas Dilger
2008-11-16 12:58 ` Peter Zijlstra
2008-11-17 21:27 ` Pekka Enberg [this message]
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=4921E1D3.8040700@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=eduard.munteanu@linux360.ro \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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