public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* ubiattach taking very long time
@ 2009-12-22 14:14 twebb
  2009-12-29 14:26 ` twebb
  2010-01-10  0:01 ` Artem Bityutskiy
  0 siblings, 2 replies; 4+ messages in thread
From: twebb @ 2009-12-22 14:14 UTC (permalink / raw)
  To: linux-mtd

Does it make any sense that a ubiattach would take > 20 secs?  The
flash I'm using is Samsung 4GiB MLC NAND flash.  I'm running 2.6.28
kernel.  Here's the capture...

[    1.753280] Creating 6 MTD partitions on "Samsung 32Gibx8":
[    1.758855] 0x000000000000-0x000000080000 : "bootloader-alt"
[    1.765676] 0x000000080000-0x000000100000 : "environment-alt"
[    1.772290] 0x000000100000-0x000000400000 : "kernel-alt"
[    1.778403] 0x000000400000-0x000000800000 : "kernelrecovery-alt"
[    1.785252] 0x000000800000-0x000004000000 : "maintenance"
[    1.791577] 0x000004000000-0x000100000000 : "system"
[    1.799725] UBI: attaching mtd5 to ubi0
[    1.803630] UBI: physical eraseblock size:   524288 bytes (512 KiB)
[    1.809901] UBI: logical eraseblock size:    516096 bytes
[    1.815365] UBI: smallest flash I/O unit:    4096
[    1.820067] UBI: VID header offset:          4096 (aligned 4096)
[    1.826109] UBI: data offset:                8192
[   23.124750] UBI: attached mtd5 to ubi0
[   23.128505] UBI: MTD device name:            "system"
[   23.133702] UBI: MTD device size:            4032 MiB
[   23.138757] UBI: number of good PEBs:        8064
[   23.143495] UBI: number of bad PEBs:         0
[   23.147945] UBI: max. allowed volumes:       128
[   23.152592] UBI: wear-leveling threshold:    256
[   23.157211] UBI: number of internal volumes: 1
[   23.161689] UBI: number of user volumes:     4
[   23.166135] UBI: available PEBs:             4
[   23.170612] UBI: total number of reserved PEBs: 8060
[   23.175584] UBI: number of PEBs reserved for bad PEB handling: 80
[   23.181715] UBI: max/mean erase counter: 2/0
[   23.186120] UBI: background thread "ubi_bgt0d" started, PID 421

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ubiattach taking very long time
  2009-12-22 14:14 ubiattach taking very long time twebb
@ 2009-12-29 14:26 ` twebb
       [not found]   ` <4B3A725F.4050200@lambsys.com>
  2010-01-10  0:01 ` Artem Bityutskiy
  1 sibling, 1 reply; 4+ messages in thread
From: twebb @ 2009-12-29 14:26 UTC (permalink / raw)
  To: linux-mtd

> Does it make any sense that a ubiattach would take > 20 secs?  The
> flash I'm using is Samsung 4GiB MLC NAND flash.  I'm running 2.6.28
> kernel.  Here's the capture...
>
> [    1.753280] Creating 6 MTD partitions on "Samsung 32Gibx8":
> [    1.758855] 0x000000000000-0x000000080000 : "bootloader-alt"
> [    1.765676] 0x000000080000-0x000000100000 : "environment-alt"
> [    1.772290] 0x000000100000-0x000000400000 : "kernel-alt"
> [    1.778403] 0x000000400000-0x000000800000 : "kernelrecovery-alt"
> [    1.785252] 0x000000800000-0x000004000000 : "maintenance"
> [    1.791577] 0x000004000000-0x000100000000 : "system"
> [    1.799725] UBI: attaching mtd5 to ubi0
> [    1.803630] UBI: physical eraseblock size:   524288 bytes (512 KiB)
> [    1.809901] UBI: logical eraseblock size:    516096 bytes
> [    1.815365] UBI: smallest flash I/O unit:    4096
> [    1.820067] UBI: VID header offset:          4096 (aligned 4096)
> [    1.826109] UBI: data offset:                8192
> [   23.124750] UBI: attached mtd5 to ubi0
> [   23.128505] UBI: MTD device name:            "system"
> [   23.133702] UBI: MTD device size:            4032 MiB
> [   23.138757] UBI: number of good PEBs:        8064
> [   23.143495] UBI: number of bad PEBs:         0
> [   23.147945] UBI: max. allowed volumes:       128
> [   23.152592] UBI: wear-leveling threshold:    256
> [   23.157211] UBI: number of internal volumes: 1
> [   23.161689] UBI: number of user volumes:     4
> [   23.166135] UBI: available PEBs:             4
> [   23.170612] UBI: total number of reserved PEBs: 8060
> [   23.175584] UBI: number of PEBs reserved for bad PEB handling: 80
> [   23.181715] UBI: max/mean erase counter: 2/0
> [   23.186120] UBI: background thread "ubi_bgt0d" started, PID 421
>

Does anyone have any suggestions on this problem?  I feel certain that
I must have something configured wrong that results in the long attach
time, but everything else seems to work just fine.

Thanks,
twebb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ubiattach taking very long time
       [not found]   ` <4B3A725F.4050200@lambsys.com>
@ 2009-12-29 22:13     ` twebb
  0 siblings, 0 replies; 4+ messages in thread
From: twebb @ 2009-12-29 22:13 UTC (permalink / raw)
  To: David Lambert; +Cc: linux-mtd

> I got the following advice for a similar problem. I found I had debugging
> turned on.
>
> "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
>

Thanks for the input.

I don't have any debugging turned on, but I'll try the speedtest.  It
doesn't appear to be a standard mtd-util; where can I find it?  And
any idea how I'll determine from the results that the nand throughput
is the problem?  i.e. what is considered acceptable or not?

twebb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ubiattach taking very long time
  2009-12-22 14:14 ubiattach taking very long time twebb
  2009-12-29 14:26 ` twebb
@ 2010-01-10  0:01 ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-01-10  0:01 UTC (permalink / raw)
  To: twebb; +Cc: linux-mtd

On Tue, 2009-12-22 at 09:14 -0500, twebb wrote:
> Does it make any sense that a ubiattach would take > 20 secs?  The
> flash I'm using is Samsung 4GiB MLC NAND flash.  I'm running 2.6.28
> kernel.  Here's the capture...

Yes, it can do this. UBI is not scalable, read here:

http://www.linux-mtd.infradead.org/doc/ubi.html#L_scalability

Please, also take a look here:
http://www.linux-mtd.infradead.org/faq/ubi.html#L_attach_faster

To really fix your problem we need UBI2.

In your case, it needs to read 8KiB from each PEB. If you know your I/O
speed, you can do the math.

To measure your read speed and scan speed, you can use 'mtd_speedtest':

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


-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-10  0:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 14:14 ubiattach taking very long time twebb
2009-12-29 14:26 ` twebb
     [not found]   ` <4B3A725F.4050200@lambsys.com>
2009-12-29 22:13     ` twebb
2010-01-10  0:01 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox