summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/Kconfig
diff options
context:
space:
mode:
authorStefan Riedmueller <s.riedmueller@phytec.de>2019-09-20 13:35:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-14 12:52:11 +0200
commitd1210dc63f38e7e6d8147b44b3f6f9518c099306 (patch)
tree82febde62f5ae5694a608f6582e4e1fdc016cad0 /drivers/mtd/ubi/Kconfig
parent003737566584dc1bed4ddfcde17c9d59e58073c1 (diff)
downloadbarebox-d1210dc63f38e7e6d8147b44b3f6f9518c099306.tar.gz
barebox-d1210dc63f38e7e6d8147b44b3f6f9518c099306.tar.xz
mtd: ubi: Max out wear-leveling threshold
Due to the recursive ubi_thread implementation in the barebox, a large amount of wear-leveling can lead to a stack overflow. This was observed during extensive ubi stress tests with the linux kernel and periodic power cycles. We found that if the wear-leveling threshold is exceeded and a large amount of erase blocks need wear-leveling the stack can overflow. The hardware used to observe this was a phyCORE-i.MX 6 with 1GB NAND flash. As the kernel is perfectly capable of handling wear-leveling we can disable wear-leveling in the barebox by maxing out the threshold and removing its Kconfig option. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi/Kconfig')
-rw-r--r--drivers/mtd/ubi/Kconfig17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 9a344082b7..ed2f13d14c 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -10,23 +10,6 @@ menuconfig MTD_UBI
if MTD_UBI
-config MTD_UBI_WL_THRESHOLD
- int "UBI wear-leveling threshold"
- default 4096
- range 2 65536
- 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).
-
config MTD_UBI_BEB_LIMIT
int "Maximum expected bad eraseblock count per 1024 eraseblocks"
default 20