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:	Tue, 22 Apr 2014 16:02:21 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
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 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.

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

Thanks.

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