richard at nod.at
Mon May 18 13:47:55 PDT 2015
Am 18.05.2015 um 22:36 schrieb Johannes Bauer:
> On 18.05.2015 19:58, Richard Weinberger wrote:
>> Wear-leveling is done on UBI and UBIFS.
>> What is CONFIG_MTD_UBI_WL_THRESHOLD set to?
> Ooops. I honestly don't know, will check this out tomorrow. I must admit
> that I wasn't aware of this setting at all.
>> >From the Kconfig help:
>> This parameter defines the maximum difference between the highest
>> erase counter value and the lowest erase counter value of eraseblocks
>> of UBI devices. When this threshold is exceeded, UBI starts performing
>> wear leveling by means of moving data from eraseblock with low erase
>> counter to eraseblocks with high erase counter.
>> The default value should be OK for SLC NAND flashes, NOR flashes and
>> other flashes which have eraseblock life-cycle 100000 or more.
>> However, in case of MLC NAND flashes which typically have eraseblock
>> life-cycle less than 10000, the threshold should be lessened (e.g.,
>> to 128 or 256, although it does not have to be power of 2)
>> I suspect that your threshold was never reached.
> Yes, I suspect you're right here.
If you did not set CONFIG_MTD_UBI_WL_THRESHOLD it is 4096.
So, regular wear-leveling did never happen.
>> >From your provided graph it looks like all erase block have been
>> erased t most 300 times.
>> If your NAND starts dying after 300 erases you're in trouble.
> And I fear you're right here as well :-(
> Although there's no definitive saying how many page writes the failed
> units had because the defective sectors are so broken that the kernel
> barfs out I/O errors. That means I can't even read the OOB metadata.
The OOB-Data does not matter. UBI is not using OOB.
So, you have to figure out why UBIFS is dying. Maybe it is a NAND issue.
More information about the linux-mtd