[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [RFC] B+Tree library
From:       Jörn Engel <joern () logfs ! org>
Date:       2008-10-31 23:36:15
Message-ID: 20081031233614.GA24960 () logfs ! org
[Download RAW message or body]

On Fri, 31 October 2008 20:17:45 +0000, Sean Young wrote:
> On Sun, Oct 26, 2008 at 01:46:44PM +0100, Joern Engel wrote:
> > General advantages of btrees are memory density and efficient use of
> > cachelines.  Hashtables are either too small and degrade into linked
> > list performance, or they are too large and waste memory.  With changing
> > workloads, both may be true on the same system.  Rbtrees have a bad
> > fanout of less than 2 (they are not actually balanced binary trees),
> > hence reading a fairly large number of cachelines to each lookup.
> 
> Which reminds me:
> 
> find_vma() uses rbtrees. Now I assume find_vma() is called far more than
> mmap() and friends. Since avltree are balanced (unlike rbtrees) lookups
> will be faster at the expense of extra rotations during updates.

Maybe I should have been clearer.  Rbtrees _are_ balanced trees.  They
are not balanced _binary_ trees, but balanced 234-trees in a binary
representation.

> Would patches for avltrees be accepted?

The question is whether they are an improvement.  As always.

Jörn

-- 
Das Aufregende am Schreiben ist es, eine Ordnung zu schaffen, wo
vorher keine existiert hat.
-- Doris Lessing
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic