Skip to contentSkip to conversation

Long attach times attaching MTD to UBI

DISCUSSION David Lambert 3 participants 3 messages Sep 28, 2009 – Sep 29, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Please excuse me if this is a naive question as I am a newbie to MTD and flash file systems.

I am attempting to enable UBIFS on an Atmel AT91RM9200 using kernel version 2.6.30.1. One of the attractions was fast mount times compared to JFFS2 etc. Unfortunately I am running into VERY long attach times as witnessed below. Obviously I must be doing something very wrong as the documentation indicates that attaching a 1G partition should take around 2 seconds, but mine is over 8 minutes!

Any help in how I can identify the bottleneck would be greatly appreciated.

# time ubiattach /tmp/ubi_ctrl -m 6
UBI: attaching mtd6 to ubi2
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd6 to ubi2
UBI: MTD device name:            "NAND3"
UBI: MTD device size:            1200 MiB
UBI: number of good PEBs:        9573
UBI: number of bad PEBs:         27
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             9474
UBI: total number of reserved PEBs: 99
UBI: number of PEBs reserved for bad PEB handling: 95
UBI: max/mean erase counter: 1/1
UBI: background thread "ubi_bgt2d" started, PID 425
UBI device number 2, total 9573 LEBs (1235146752 bytes, 1.2 GiB), available 9474 LEBs (1222373376 bytes, 1.1 GiB), LEB size 129024 bytes (126.0 KiB)
real    8m3.943s
user    0m0.010s
sys     7m53.621s

#

Formatting the same partition takes around 1.5 minutes

# time ubiformat /dev/mtd6
ubiformat: mtd6 (nand), size 1258291200 bytes (1.2 GiB), 9600 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 9599 -- 100 % complete ubiformat: 9573 eraseblocks have valid erase counter, mean value is 1
ubiformat: 27 bad eraseblocks found, numbers: 70, 164, 533, 885, 2477, 2807, 3096, 3777, 3972, 4023, 4390, 4506, 4836, 5115, 5245, 5282, 5284, 5528, 5614, 5720, 5860, 6332, 6616, 7223, 7864, 7948, 8841
ubiformat: formatting eraseblock 9599 -- 100 % complete 
real    1m33.187s
user    0m5.545s
sys     0m33.862s

#

#1 lore raw
Quoted 3 lines · David Lambert

Please excuse me if this is a naive question as I am a newbie to MTD and flash file systems.

I am attempting to enable UBIFS on an Atmel AT91RM9200 using kernel version 2.6.30.1. One of the attractions was fast mount times compared to JFFS2 etc. Unfortunately I am running into VERY long attach times as witnessed below. Obviously I must be doing something very wrong as the documentation indicates that attaching a 1G partition should take around 2 seconds, but mine is over 8 minutes!

Is your NAND slow? Have you configured UBI debugging checks turned on?

#2 lore raw
Quoted 4 lines · Adrian Hunter
Quoted 3 lines · David Lambert

Please excuse me if this is a naive question as I am a newbie to MTD and flash file systems.

Quoted 8 lines
Quoted 6 lines

I am attempting to enable UBIFS on an Atmel AT91RM9200 using kernel version 2.6.30.1. One of the attractions was fast mount times compared to JFFS2 etc. Unfortunately I am running into VERY long attach times as witnessed below. Obviously I must be doing something very wrong as the documentation indicates that attaching a 1G partition should take around 2 seconds, but mine is over 8 minutes!

Is your NAND slow? Have you configured UBI debugging checks turned on?

Please, measure your nand throughput withmtd_speedtest:

http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)