[RFC] [PATCH] UBI: refine wear leveling logic

Alexander Schmidt alexs at linux.vnet.ibm.com
Fri Mar 30 10:40:06 EDT 2007

On Friday 30 March 2007, Artem Bityutskiy wrote:
> > If so then i propose to make get_peb() wait until the bgt produces a free
> > peb and not mix synchronous/asynchronous operations, as this would make
> > the code easier, IMO.
> It already does this AFAIK.

In the current code, wl_get_peb() calls produce_free_peb() if the
free tree is empty and thereby performs a synchronous work (even if the
bgt is enabled). This is what I meant with "mixing" sync/async.

So I think making the user thread wait for the wl thread to free a peb
(e.g. by sleeping while waiting for a semaphore) could lead to a better
performance as the wl thread will likely finish its work before the user
thread has performed a whole work.


More information about the linux-mtd mailing list