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

Artem Bityutskiy dedekind at infradead.org
Mon Apr 2 06:53:25 EDT 2007


On Fri, 2007-03-30 at 16:40 +0200, Alexander Schmidt wrote:
> 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.

OK, what's wring with this? We do not have eraseblocks, we produce them
synchronously.

We cannot rely on the thread - what if it was killed or its priority is
too low, but the requesting task needs eraseblocks ASAP.

> 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.

Not necessarily. The current approach is safer.

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





More information about the linux-mtd mailing list