linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Xymoron <oxymoron@waste.org>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Kevin O'Connor <koconnor@cse.Buffalo.EDU>,
	linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: Re: AVL trees vs. Red-Black trees
Date: Sat, 27 Nov 1999 23:29:33 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.4.10.9911272326150.29377-100000@waste.org> (raw)
In-Reply-To: <Pine.LNX.4.10.9911280354150.509-100000@alpha.random>

On Sun, 28 Nov 1999, Andrea Arcangeli wrote:

> On Sat, 27 Nov 1999, Kevin O'Connor wrote:
> 
> >I was a little surprised to see that the MM code uses an AVL tree - my old
> >textbooks are of the opinion that Red-Black trees are superior.
> 
> You basically do a query for each page fault and an insert for each mmap
> and a remove for each munmap thus AVL gives better performances.
> 
> >Implementing the code to create a stack for performing "bottom-up"
> >insertions/deletions seems like a pain to me.  I would think the "top-down"
> >approach of a Red-Black tree would be more efficient and probably simpler
> >to implement.
> 
> I just implemented RB trees in the kernel with a reusable implementation
> exactly like include/linux/list.h for the lists.
> 
> If somebody find this interesting I can provide a patch to add the
> include/linux/rbtree.h and lib/rbtree.c that will provde rbtree support.

I'd like to take a look at this, I've been looking at putting some more
uniform tree structures in the kernel (post 2.4).

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-11-28  5:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-27 12:59 Kevin O'Connor
1999-11-28  2:57 ` Andrea Arcangeli
1999-11-28  5:29   ` Oliver Xymoron [this message]
1999-11-29 15:54     ` [patch] rbtrees [was Re: AVL trees vs. Red-Black trees] Andrea Arcangeli
1999-11-29 19:18       ` Manfred Spraul
1999-11-29 19:17         ` Andrea Arcangeli
1999-11-30  5:27         ` Kevin O'Connor
1999-11-30 14:14           ` Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.9911272326150.29377-100000@waste.org \
    --to=oxymoron@waste.org \
    --cc=andrea@suse.de \
    --cc=koconnor@cse.Buffalo.EDU \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox