Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-10-02 Thread Tanya Brokhman
On 9/30/2014 10:44 AM, Richard Weinberger wrote: Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: +

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-10-02 Thread Tanya Brokhman
On 9/30/2014 10:44 AM, Richard Weinberger wrote: Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: +

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: > On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: >> Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: >>> On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(>wl_lock); + ubi->fm_work_scheduled =

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: > Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: > > On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: > >> + spin_lock(>wl_lock); > >> + ubi->fm_work_scheduled = 0; > >> + spin_unlock(>wl_lock); > > > >

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: > On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: >> + spin_lock(>wl_lock); >> + ubi->fm_work_scheduled = 0; >> + spin_unlock(>wl_lock); > > Andrew Morton once said me that if I am protecting an integer change > like

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: > + spin_lock(>wl_lock); > + ubi->fm_work_scheduled = 0; > + spin_unlock(>wl_lock); Andrew Morton once said me that if I am protecting an integer change like this with a spinlock, I have a problem in my locking design.

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(ubi-wl_lock); + ubi-fm_work_scheduled = 0; + spin_unlock(ubi-wl_lock); Andrew Morton once said me that if I am protecting an integer change like this with a spinlock, I have a problem in my locking

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(ubi-wl_lock); + ubi-fm_work_scheduled = 0; + spin_unlock(ubi-wl_lock); Andrew Morton once said me that if I am protecting an integer change like this

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(ubi-wl_lock); + ubi-fm_work_scheduled = 0; + spin_unlock(ubi-wl_lock); Andrew Morton

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: + spin_lock(ubi-wl_lock); + ubi-fm_work_scheduled = 0; +

[PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-29 Thread Richard Weinberger
If the WL pool runs out of PEBs we schedule a fastmap write to refill it was soon as possible. Ensure that only one at a time is scheduled otherwise we might end in a fastmap write storm was writing the fastmap can schedule another write if bitflips were detected. Signed-off-by: Richard

[PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-09-29 Thread Richard Weinberger
If the WL pool runs out of PEBs we schedule a fastmap write to refill it was soon as possible. Ensure that only one at a time is scheduled otherwise we might end in a fastmap write storm was writing the fastmap can schedule another write if bitflips were detected. Signed-off-by: Richard