mbox series

[0/2] ubi: Two small bugfixs for wear-leveling

Message ID 20240819032622.2241165-1-chengzhihao1@huawei.com
Headers show
Series ubi: Two small bugfixs for wear-leveling | expand

Message

Zhihao Cheng Aug. 19, 2024, 3:26 a.m. UTC
The mtd-utils/ubi-tests and ubifs-xfstests are passed.
The life time of the flash is slightly improved:
Config:
x86_64 qemu
flash: nandsim(1024 PEBs, pool=50, wl_pool=25, without pool reservation)
CONFIG_MTD_UBI_BEB_LIMIT=20
CONFIG_MTD_UBI_WL_THRESHOLD=50
CONFIG_MTD_UBI_FASTMAP=y
running fsstress for 1h:

Before applying patches (PEB erase counters Histogram):
=========================================================
from              to     count      min      avg      max
---------------------------------------------------------
0        ..        9:        0        0        0        0
10       ..       99:        0        0        0        0
100      ..      999:     1024      646      684      988
1000     ..     9999:        0        0        0        0
10000    ..    99999:        0        0        0        0
100000   ..      inf:        0        0        0        0
---------------------------------------------------------
Total               :     1024      646      684      988

After applying patches (PEB erase counters Histogram):
=========================================================
from              to     count      min      avg      max
---------------------------------------------------------
0        ..        9:        0        0        0        0
10       ..       99:        0        0        0        0
100      ..      999:     1024      629      666      960
1000     ..     9999:        0        0        0        0
10000    ..    99999:        0        0        0        0
100000   ..      inf:        0        0        0        0
---------------------------------------------------------
Total               :     1024      629      666      960 (0~64)

Zhihao Cheng (2):
  ubi: wl: Put source PEB into correct list if trying locking LEB failed
  ubi: fastmap: wl: Schedule fm_work if wear-leveling pool is empty

 drivers/mtd/ubi/fastmap-wl.c | 19 ++++++++++++++++---
 drivers/mtd/ubi/wl.c         | 11 +++++++++--
 drivers/mtd/ubi/wl.h         |  3 ++-
 3 files changed, 27 insertions(+), 6 deletions(-)