lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4921E1D3.8040700@cs.helsinki.fi>
Date:	Mon, 17 Nov 2008 23:27:47 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-ext4@...r.kernel.org, cl@...ux-foundation.org,
	mpm@...enic.com, eduard.munteanu@...ux360.ro
Subject: Re: [PATCH] ext2/ext3: allocate ->s_blockgroup_lock separately to
 avoid wasting space

Peter Zijlstra wrote:
> On Fri, 2008-11-14 at 11:17 +0200, Pekka J Enberg wrote:
>> From: Pekka Enberg <penberg@...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.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ