[RFC] slight UBI scan time improvement

Artem Bityutskiy dedekind at infradead.org
Wed Apr 23 08:23:55 EDT 2008


On Wed, 2008-04-23 at 18:51 +0800, Nancy wrote:
>       Will you please explain why need leb_read_lock()?

This locks the LEB and prevent concurrent I/O to this LEB. E.g., we do
not want a situation when one process unmaps an LEB while another
process is writing to it.

That was probably overkill, but I implemented per-LEB r/w locking. This
is similar to rw semaphore in Linux. It means that several processes may
simultaneously read for this LEB, but only one process at a time may
write (or unmap).

>       If I ummap a leb(only operate the eba table, do not do
> ubi_wl_put_peb() ), then, what will that PEB belong to? wl->free,
> wl->used, wl->prot.pnum, wl->prot.aec, wl->scrub? What will happen to
> that PEB?

If you unmap it you have to clean the corresponding EBA table record and
return it to the WL unit.

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




More information about the linux-mtd mailing list