Wear-leveling peculiarities
Richard Weinberger
richard.weinberger at gmail.com
Mon May 18 10:58:20 PDT 2015
On Mon, May 18, 2015 at 4:09 PM, Johannes Bauer
<weolanwaybqm at spornkuller.de> wrote:
> Am 18.05.2015 15:53, schrieb Johannes Bauer:
>
>> I don't grasp the whole picture.
>
>
> Obviously.
>
> I've been thinking about this some more and had an epiphany pretty much ten
> seconds after I hit the "send" button on my email.
>
> Wear-leveling is working alright, but of course some parts (static operating
> system components, for example) will never be written a lot of times,
> because there is no need to change their contents. Wear-leveling is only
> performed on the sectors which are actively written (and on those which are
> unoccupied). This would explain the graphs, but is the explanation also
> correct?
Wear-leveling is done on UBI and UBIFS.
What is CONFIG_MTD_UBI_WL_THRESHOLD set to?
>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.
>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.
--
Thanks,
//richard
More information about the linux-mtd
mailing list