Does UBI still place a just-tortured block first in the free block list?

Atlant Schmidt aschmidt at dekaresearch.com
Tue Jul 1 08:02:12 PDT 2014


Artem:

> I am not sure about the list you are talking about, do you just assume
> there is a list or you mean a specific list?

  I merely assumed a list. Your comment about the RB-tree
  below clears-up my faulty assumption.


> Not sure, eraseblocks are stored in an RB-tree tree which is indexed by
> the erase counter. Then UBI picks those with smaller erase counters
> first.

  Aha! That explains how the loop is eventually broken!
  (I always wondered about that.)

  When the block has finally been tortured to the point
  where it is no longer in the category of least-erased
  blocks, a new block is finally selected from the RB-tree
  and the write (very probably) finally succeeds.


> I do not think this part of UBI changed for the last several years.

  That's too bad; this scenario (which happens to us
  quite frequently) occasionally causes long delays
  writing to our UBIfs.

  I guess I'll go find that tree and see how we might
  change things so that a different block would win
  the next election. Any suggestions?

                                Atlant

-----Original Message-----
From: Artem Bityutskiy [mailto:dedekind1 at gmail.com]
Sent: Tuesday, July 01, 2014 10:53 AM
To: Atlant Schmidt
Cc: 'linux-mtd at lists.infradead.org'; Cale Surgen
Subject: Re: Does UBI still place a just-tortured block first in the free block list?

Hi Atlant,

On Tue, 2014-07-01 at 09:11 -0400, Atlant Schmidt wrote:
> Folks:
>
>   Several years ago, the behavior of UBI was that if a block
>   failed to write, UBI would torture-test the block (with 0x5A
>   and 0xA5 patterns) and if the block passed the torture test,
>   it would be placed at the top of the list of available blocks.

Not sure, eraseblocks are stored in an RB-tree tree which is indexed by
the erase counter. Then UBI picks those with smaller erase counters
first.

>   With this algorithm, UBI would attempt to again use the just-
>   tortured block for the data that was still waiting to be written.
>   But because the write failures were often data-dependent, in
>   our experience, the block would frequently again fail to store
>   the data to be written. It would be tortured again, passed again,
>   and the cycle would repeat. We've seen this cycle continue for
>   minutes at a time.

Sounds like a possible scenario, if the PEB in question has low erase
counter.

>   Is the algorithm still the same? Or is the just-tortured block
>   now placed at the bottom of the list of available blocks so that
>   it will only show up again later (when the data to be written
>   will probably be different)?

I am not sure about the list you are talking about, do you just assume
there is a list or you mean a specific list?

I do not think this part of UBI changed for the last several years.

--
Best Regards,
Artem Bityutskiy


This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.


More information about the linux-mtd mailing list