UBI wear-leveling threshold

configname: CONFIG_MTD_UBI_WL_THRESHOLD

Linux Kernel Configuration
└─>Device Drivers
└─>Memory Technology Device (MTD) support
└─>Enable UBI - Unsorted block images
└─>UBI wear-leveling threshold
In linux kernel since version 2.6.24 (release Date: 2008-01-24)  
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).