All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: xiaochuan-xu <xiaochuan-xu@cqu.edu.cn>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] UBI WL-Subsystem: Improvement in prot tree
Date: Mon, 08 Dec 2008 15:08:07 +0200	[thread overview]
Message-ID: <1228741687.13686.122.camel@sauron> (raw)
In-Reply-To: <1228741326.13686.119.camel@sauron>

On Mon, 2008-12-08 at 15:02 +0200, Artem Bityutskiy wrote:
> On Mon, 2008-12-08 at 16:15 +0800, xiaochuan-xu wrote:
> > Hi, all.
> > 
> > A new PEB protection method in UBI WL-Subsystem is implemented,
> > It's simpler and higher efficiency than the older prot RB-tree, I think.
> > 
> > 1. without two prot RB-tree, there is only one prot array, But their
> > functions are the same.
> > 
> > 2. no other structure needed except @ubi_wl_entry ubi_wl_prot_entry is
> > discarded. and we need not malloc new struct every time in
> > ubi_wl_get_peb() function.
> > 
> > 3. protarray add and del operation are O(1) operations, and check over
> > opteration is O(n), which is better then the older prot RB-tree
> > implement.
> 
> Hi,
> 
> yeah, I like the idea. Indeed there is no reason to have balanced trees
> for this "protection" stuff, and a list should be enough. The list does
> not have to be long, 8-16 entries are enough, so search should be quick
> enough. Every time an eraseblock is erased, we take one element from the
> head of the list, and we add new elements to the head of the list, so it
> acts as a queue.

Err, sure we add elements to the tail.

I've created a git tree for you again (xxc-ubi-2.6.git).

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2008-12-08 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08  8:15 [PATCH] UBI WL-Subsystem: Improvement in prot tree xiaochuan-xu
2008-12-08  8:15 ` xiaochuan-xu
2008-12-08  8:27 ` Artem Bityutskiy
2008-12-08 13:02 ` Artem Bityutskiy
2008-12-08 13:08   ` Artem Bityutskiy [this message]

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=1228741687.13686.122.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=xiaochuan-xu@cqu.edu.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.