linux-mtd: ubiattach taking long time

Pintu Agarwal pintu.ping at gmail.com
Mon Mar 25 09:57:10 PDT 2024


Hi All,

We are using arm64, quad-core, with Linux Kernel 5.15 with 1GB NAND.
We have A/B partitioning and around 9 ubi volumes.

During boot-up we observed that the ubiattach alone is taking around
1.2 secs (either user space or kernel space).
The snapshot of the log is shown below.

I have tried using fastmap as well, but still no difference.
Are there any other techniques to improve the ubiattach timing ?

Logs:
----------
Doing from initramfs:
{{{
[    6.949143][  T214] ubi0: attaching mtd54
[    8.023766][  T214] ubi0: scanning is finished
[    8.035901][  T214] ubi0: attached mtd54 (name "system", size 867 MiB)
[    8.042635][  T214] ubi0: PEB size: 262144 bytes (256 KiB), LEB
size: 253952 bytes
[    8.050423][  T214] ubi0: min./max. I/O unit sizes: 4096/4096,
sub-page size 4096
[    8.058134][  T214] ubi0: VID header offset: 4096 (aligned 4096),
data offset: 8192
[    8.066011][  T214] ubi0: good PEBs: 3470, bad PEBs: 0, corrupted PEBs: 0
[    8.072995][  T214] ubi0: user volume: 10, internal volumes: 1,
max. volumes count: 128
[    8.081225][  T214] ubi0: max/mean erase counter: 3/0, WL
threshold: 4096, image sequence number: 302691963
[    8.091242][  T214] ubi0: available PEBs: 0, total reserved PEBs:
3470, PEBs reserved for bad PEB handling: 80
[    8.101544][  T215] ubi0: background thread "ubi_bgt0d" started, PID 215
UBI device number 0, total 3470 LEBs (881213440 bytes, 840.3 MiB),
available 0 LEBs (0 bytes), LEB size 253952 bytes (248.0 KiB)
[    8.136907][  T227] block ubiblock0_0: created from ubi0:0(rootfs_a)
}}}

Doing from Kernel using cmdline: ubi.mtd=54,0,30 :
{{{
[    6.702817][    T1] ubi0: default fastmap pool size: 170
[    6.702822][    T1] ubi0: default fastmap WL pool size: 85
[    6.702826][    T1] ubi0: attaching mtd54
[…]
[    7.784955][    T1] ubi0: scanning is finished
[    7.797135][    T1] ubi0: attached mtd54 (name "system", size 867 MiB)
}}}


Thanks,
Pintu



More information about the linux-mtd mailing list