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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 05 Feb 2009 01:17:46 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jörn Engel <joern@...fs.org>,
	Theodore Tso <tytso@....edu>, Andi Kleen <andi@...stfloor.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	"Luis R. Rodriguez" <mcgrof@...il.com>
Subject: Re: [PATCH] add b+tree library

Let me get back to this...

> > The IDR code there wasn't very well designed and still has holes.  The
> > radix-tree code afaik is solid, but look at all the stuff it does!
> 
> Yeah, its a bit of a mess, but solvable, as radix trees show.

To be fair, it hasn't been attempted yet though.

> B-tree's however have one thing over RB-trees, B-trees can be made
> RCU-safe whereas RB-trees cannot be -- the only problem is that Joern's
> doesn't do that.
> 
> I've been poking at my B-tree implementation but got distracted by the
> mutex spin stuff, its still buggy (still the insert sibling overflow --
> the rest should be ok-ish, although I need a hard look at the memory
> barriers).

Joern may need arbitrary key lengths, don't. But I've just looked around
a little:

 * radix trees are completely unsuitable for use as a sort of hash table
   because of their behaviour when keys are not at last mostly
   contiguous
 * rbtrees require lots of boilerplate code, and have much worse cache
   behaviour

In my use case, tracking the wifi APs around you, you have to scale from
a single one to >1k (yes, it's happening!), and lookups better be fast
because you might be doing them a lot (dozens of times per second).

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ