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:	Fri, 11 Apr 2008 12:37:57 +0200
From:	Jörn Engel <joern@...fs.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-mtd@...ts.infradead.org
Subject: Re: [patch 10/15] fs/logfs/memtree.c

On Thu, 10 April 2008 16:07:44 +0200, Arnd Bergmann wrote:
> On Tuesday 01 April 2008, joern@...fs.org wrote:
> > +#if BITS_PER_LONG == 32
> > +#define BTREE_NODES 20 /* 32bit, 240 byte nodes */
> > +#else
> > +#define BTREE_NODES 16 /* 64bit, 256 byte nodes */
> > +#endif
> > +
> > +struct btree_node {
> > +       u64 key;
> > +       struct btree_node *node;
> > +};
> 
> On 32 bit platforms other than x86, your struct btree_node
> is 16 bytes long because of alignment requirements, rather
> than the 12 bytes you are assuming.

Indeed.  Will change the definition.

Long-term I'd like to generalize the btree a bit and allow three key
variants: long, u64 and u8[].  Some people want to stuff a
(u64, u64, u8) tupel into a btree.  For those it seems ideal to just
treat the key as an array and do memcmp() for comparison.

Jörn

-- 
You can't tell where a program is going to spend its time. Bottlenecks
occur in surprising places, so don't try to second guess and put in a
speed hack until you've proven that's where the bottleneck is.
-- Rob Pike
--
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