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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Apr 2014 09:44:59 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Tejun Heo <tj@...nel.org>
CC:	<linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Vladimir Davydov <vdavydov@...allels.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Jeff Layton <jlayton@...hat.com>,
	Andreas Gruenbacher <agruen@...bit.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Jean Delvare <jdelvare@...e.de>,
	Monam Agarwal <monamagarwal123@...il.com>
Subject: Re: [PATCH 3/4] ida: in-place ida allocation

On 04/23/2014 04:02 AM, Tejun Heo wrote:
> On Tue, Apr 22, 2014 at 06:16:20PM +0800, Lai Jiangshan wrote:
>> There are two stages of ida allocation/free, idr_layers and ida_bitmap.
>> They add unneeded foot print and memory waste.
>>
>> When a single ID is first allocated from an ida, this ida requires
>> two big chunks of memory. One idr_layer and one ida_bitmap.
>>
>> To reduce the foot print and memory, we reduce the ida_bitmap
>> to a single "unsigned long" and place it in its own idr-slot
>> and avoid to allocate the ida_bitmap.
>>
>> It also means ida bitmap is located on its coresponding idr-slot
>> which size is the same as "unsigned long".
>> Each ida bitmap(idr-slot) contains BITS_PER_LONG ida-slots.
>>
>> The struct ida_bitmap is not needed any more, we use "unsigned long"
>> directly and remove all the code of alloc/free struct ida_bitmap.
> 
> Are you calling 128 byte a "big chunk of memory" while trading off
> tree depth for it?  No, this level of space optimizaiton is completely
> uncalled for.

I reduce the depth, you forgot that struct ida_bitmap is an additional
depth which is removed in the patch.

> 
>  Nacked-by: Tejun Heo <tj@...nel.org>
> 
> Thanks.
> 

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ