All of lore.kernel.org
 help / color / mirror / Atom feed
* Does UBI still place a just-tortured block first in the free block list?
@ 2014-07-01 13:11 Atlant Schmidt
  2014-07-01 13:40 ` Richard Weinberger
  2014-07-01 14:53 ` Artem Bityutskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Atlant Schmidt @ 2014-07-01 13:11 UTC (permalink / raw)
  To: 'linux-mtd@lists.infradead.org'; +Cc: Cale Surgen

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.

  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.

  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)?

                                Atlant


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does UBI still place a just-tortured block first in the free block list?
  2014-07-01 13:11 Does UBI still place a just-tortured block first in the free block list? Atlant Schmidt
@ 2014-07-01 13:40 ` Richard Weinberger
  2014-07-01 14:53 ` Artem Bityutskiy
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Weinberger @ 2014-07-01 13:40 UTC (permalink / raw)
  To: Atlant Schmidt; +Cc: linux-mtd, Cale Surgen

On Tue, Jul 1, 2014 at 3:11 PM, Atlant Schmidt
<aschmidt@dekaresearch.com> wrote:
> 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.

Sorry, I'm not allowed to answer you.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does UBI still place a just-tortured block first in the free block list?
  2014-07-01 13:11 Does UBI still place a just-tortured block first in the free block list? Atlant Schmidt
  2014-07-01 13:40 ` Richard Weinberger
@ 2014-07-01 14:53 ` Artem Bityutskiy
  2014-07-01 15:02   ` Atlant Schmidt
  1 sibling, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2014-07-01 14:53 UTC (permalink / raw)
  To: Atlant Schmidt; +Cc: 'linux-mtd@lists.infradead.org', Cale Surgen

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Does UBI still place a just-tortured block first in the free block list?
  2014-07-01 14:53 ` Artem Bityutskiy
@ 2014-07-01 15:02   ` Atlant Schmidt
  2014-07-01 15:14     ` Artem Bityutskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Atlant Schmidt @ 2014-07-01 15:02 UTC (permalink / raw)
  To: 'dedekind1@gmail.com'
  Cc: 'linux-mtd@lists.infradead.org', Cale Surgen

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@gmail.com]
Sent: Tuesday, July 01, 2014 10:53 AM
To: Atlant Schmidt
Cc: 'linux-mtd@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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does UBI still place a just-tortured block first in the free block list?
  2014-07-01 15:02   ` Atlant Schmidt
@ 2014-07-01 15:14     ` Artem Bityutskiy
  2014-07-01 15:27       ` Atlant Schmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2014-07-01 15:14 UTC (permalink / raw)
  To: Atlant Schmidt; +Cc: 'linux-mtd@lists.infradead.org', Cale Surgen

On Tue, 2014-07-01 at 11:02 -0400, Atlant Schmidt wrote:
>   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?

What you say sounds like the problem is not in the PEB selection
algorithm. The problem is in the "bad/good" criteria that we use.

What you say is that currently UBI is unable to reliably tell whether a
PEB is good or bad. And instead of just marking a PEB as bad, we keep
try to re-use it.

If I got it right, then I'd suggest 2 solutions.

1. Improve the 'torture' function and make it work for your case. It
would not solve the problem in general, but would solve your problem.

2. Try to detect situations when a PEB is tortured "too often". I am not
sure how to do this reliably, though, but may be you can invent
something. I guess the right way is to introduce a counter and store it
in the EC header. We have plenty of unused space there.

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Does UBI still place a just-tortured block first in the free block list?
  2014-07-01 15:14     ` Artem Bityutskiy
@ 2014-07-01 15:27       ` Atlant Schmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Atlant Schmidt @ 2014-07-01 15:27 UTC (permalink / raw)
  To: 'dedekind1@gmail.com'
  Cc: 'linux-mtd@lists.infradead.org', Cale Surgen

Artem:

  Thanks!

  We'll consider these suggestions and see if we can
  devise a generally-useful patch!

                                 Atlant

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

On Tue, 2014-07-01 at 11:02 -0400, Atlant Schmidt wrote:
>   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?

What you say sounds like the problem is not in the PEB selection
algorithm. The problem is in the "bad/good" criteria that we use.

What you say is that currently UBI is unable to reliably tell whether a
PEB is good or bad. And instead of just marking a PEB as bad, we keep
try to re-use it.

If I got it right, then I'd suggest 2 solutions.

1. Improve the 'torture' function and make it work for your case. It
would not solve the problem in general, but would solve your problem.

2. Try to detect situations when a PEB is tortured "too often". I am not
sure how to do this reliably, though, but may be you can invent
something. I guess the right way is to introduce a counter and store it
in the EC header. We have plenty of unused space there.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-01 15:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01 13:11 Does UBI still place a just-tortured block first in the free block list? Atlant Schmidt
2014-07-01 13:40 ` Richard Weinberger
2014-07-01 14:53 ` Artem Bityutskiy
2014-07-01 15:02   ` Atlant Schmidt
2014-07-01 15:14     ` Artem Bityutskiy
2014-07-01 15:27       ` Atlant Schmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.