Re: [RFC/PATCH] ubi: Replace wear leveling thread with a workqueue

2012-11-23 Thread Ezequiel Garcia
Hi Shmulik, Thanks for the review. On Fri, Nov 23, 2012 at 6:26 PM, Shmulik Ladkani wrote: [...] >> - spin_lock(&ubi->wl_lock); >> - if (list_empty(&ubi->works) || ubi->ro_mode || > > Originally, 'ubi_thread' did nothing if 'ubi->ro_mode'. > This filtering is missing from

Re: [RFC/PATCH] ubi: Replace wear leveling thread with a workqueue

2012-11-23 Thread Shmulik Ladkani
Hi Ezequiel, On Fri, 23 Nov 2012 09:13:29 -0300 Ezequiel Garcia wrote: > /** > - * ubi_thread - UBI background thread. > + * ubi_wl_do_work - UBI background wl worker function. > * @u: the UBI device description object pointer > */ > -int ubi_thread(void *u) > +void ubi_wl_do_work(struct wo

[RFC/PATCH] ubi: Replace wear leveling thread with a workqueue

2012-11-23 Thread Ezequiel Garcia
Since workqueues are both cheaper and easier to use we should prefer them, unless there's a strong reason to prefer threads instead. This patch replaces the background wear leveling thread with a workqueue (one per device). This is different from having one thread per device because each new workq