CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_WL_THRESHOLD=50 1. Generate an ubi image with fastmap ./setup.sh 1 umount temp ubidetach -m0 dd if=/dev/mtd0 of=disk 2. Disable fastmap, apply diff.patch and re-compile kernel 3. ./setup.sh 4. ~/xfstests-dev/ltp/fsstress -d temp -l 0 -n 100000 -p 4 5. Several minutes(10min~) later ========================================================= from to count min avg max --------------------------------------------------------- 0 .. 9: 1 4 4 4 10 .. 99: 0 0 0 0 100 .. 999: 399 835 858 886 1000 .. 9999: 0 0 0 0 10000 .. 99999: 0 0 0 0 100000 .. inf: 0 0 0 0 --------------------------------------------------------- Total : 400 4 856 886 $ dmesg [ 1189.836985] anchor 7 [ 1189.847611] anchor 7 [ 1189.859065] anchor 7 $ cat /sys/kernel/debug/ubi/ubi0/detailed_erase_block_info physical_block_number erase_count 0 939 1 904 2 923 3 904 4 940 5 913 6 930 7 9 # The erase counter of fm_anchor PEB is smaller than any other PEBs 8 905 9 902 10 945 11 916 12 922 13 923 14 900 15 927
Created attachment 301535 [details] setup.sh
Created attachment 301536 [details] diff.patch
(In reply to Zhihao Cheng from comment #2) > Created attachment 301536 [details] > diff.patch Use diff_v2.patch
Created attachment 301537 [details] delay_v2.patch