[PATCH] UBI WL-Subsystem: Improvement in prot tree

Artem Bityutskiy dedekind at infradead.org
Mon Dec 8 08:08:07 EST 2008


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 (Битюцкий Артём)




More information about the linux-mtd mailing list