View Single Post
Old 03-19-2012, 10:46 AM   #99
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by Poetcop View Post
* dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4
which took 137.6 seconds.
In the "dd" command, "bs=4" sets a block size of 4 BYTES. Although that works fine, it is better to use a block size optimized for the device being written to.

If you look at my original post, I used "bs=4K" (which is 4096 bytes, corresponding to the mmc nand physical erase page size). Writing a smaller blocksize (such as 1024 bytes) causes extra read/modify/write cycles (unless cached with deferred writes in the firmware), and takes much more time.

Using a tiny block size (like 4 bytes) causes MANY extra writes, which may take a lot of extra time unless the mmc firmware gathers and defers writing until it has a full erase block, and even then, there would be a lot of extra system overhead for all those extra write operations being passed to the kernel mode mmc device driver.

SUMMARY: It would have been better to use:
dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4K

Last edited by geekmaster; 03-19-2012 at 10:52 AM.
geekmaster is offline   Reply With Quote