Where is the "scrubbing" threshold set in UBI? Can it be easily varied?
Artem Bityutskiy
dedekind1 at gmail.com
Tue Jul 15 23:05:55 PDT 2014
On Thu, 2014-07-03 at 10:07 -0400, Atlant Schmidt wrote:
> Folks:
>
> Within the UBI layer, where is the threshold set that
> determines how many bit-flips must occur on a read
> before the block is "scrubbed" (stored into another
> location)?
Are you now talking about the MTD layer, and the amount of bits
corrected by an ECC? In that case, see what Pekon answered. There is a
configurable threshold and MTD won't tell UBI that there were bit-flips
unless the amount of bits corrected in an ECC "step" is greater or
equivalent to the threshold. This is documented.
> And is this done on a page-by-page basis or on a
> whole-LEB/PEB basis?
On the MTD/NAND driver level, there is a notion of ECC step. One NAND
page may consist of a single or multiple ECC steps...
UBI has no idea about ECC steps, though. It just schedules a PEB for
scrubbing if it gets -EUNCLEAN from MTD when it reads the PEB.
> That is, if a single page has
> more than threshold number of bit flips, will just
> that page be relocated or will the entire LEB be
> relocated to another PEB?
Entire PEB will be copied to another PEB, and the LEB will be re-mapped
from the old PEB to the new PEB, and the old PEB will be erased.
--
Best Regards,
Artem Bityutskiy
More information about the linux-mtd
mailing list