hi arnd
On 09/07/11 00:19, Arnd Bergmann wrote:
Best try a few other erasesize values:
./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[1024 * 1024] --blocksize=$[64 * 1024] ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[1536 * 1024] --blocksize=$[96 * 1024] ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[2048 * 1024] --blocksize=$[64 * 1024] ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[3072 * 1024] --blocksize=$[96 * 1024] ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[6144 * 1024] --blocksize=$[96 * 1024] ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[8192 * 1024] --blocksize=$[64 * 1024]
Try each one a few times. If you get to the correct erasesize value, the results should be both faster and more stable.
i tried always 4 times.. if it's unstable i post all results
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[1024 * 1024] --blocksize=$[64 * 1024]
1MiB 1.49M/s 512KiB 1.92M/s 256KiB 785K/s 128KiB 752K/s 64KiB 1.14M/s
1MiB 548K/s 512KiB 580K/s 256KiB 645K/s 128KiB 954K/s 64KiB 1.27M/s
1MiB 666K/s 512KiB 705K/s 256KiB 747K/s 128KiB 1.04M/s 64KiB 1.09M/s
1MiB 725K/s 512KiB 688K/s 256KiB 745K/s 128KiB 1.11M/s 64KiB 1.37M/s
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[1536 * 1024] --blocksize=$[96 * 1024]
1.5MiB 1.14M/s 768KiB 1.61M/s 384KiB 1.21M/s 192KiB 1.11M/s 96KiB 974K/s
1.5MiB 683K/s 768KiB 897K/s 384KiB 833K/s 192KiB 1.05M/s 96KiB 790K/s
next 2 all stable at <1M/s
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[2048 * 1024] --blocksize=$[64 * 1024]
2MiB 928K/s 1MiB 1.78M/s 512KiB 2.16M/s 256KiB 878K/s 128KiB 1.02M/s 64KiB 1.16M/s
2MiB 626K/s 1MiB 932K/s 512KiB 910K/s 256KiB 1e+03K/ 128KiB 1.1M/s 64KiB 1.25M/s
2MiB 694K/s 1MiB 815K/s 512KiB 741K/s 256KiB 695K/s 128KiB 959K/s 64KiB 1.23M/s
2MiB 698K/s 1MiB 818K/s 512KiB 851K/s 256KiB 788K/s 128KiB 939K/s 64KiB 1.19M/s
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[3072 * 1024] --blocksize=$[96 * 1024]
3MiB 801K/s 1.5MiB 727K/s 768KiB 726K/s 384KiB 747K/s 192KiB 903K/s 96KiB 799K/s
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[6144 * 1024] --blocksize=$[96 * 1024]
6MiB 1.34M/s 3MiB 2.54M/s 1.5MiB 3.41M/s 768KiB 2.26M/s 384KiB 942K/s 192KiB 854K/s 96KiB 722K/s
6MiB 1.59M/s 3MiB 2.78M/s 1.5MiB 3.74M/s 768KiB 2.75M/s 384KiB 973K/s 192KiB 815K/s 96KiB 685K/s
6MiB 701K/s 3MiB 672K/s 1.5MiB 670K/s 768KiB 798K/s 384KiB 729K/s 192KiB 800K/s 96KiB 652K/s
6MiB 1.92M/s 3MiB 2.17M/s 1.5MiB 2.38M/s 768KiB 1.87M/s 384KiB 986K/s 192KiB 869K/s 96KiB 724K/s
$ ./flashbench --open-au-nr=2 --random /dev/mmcblk0p3 -O --erasesize=$[8192 * 1024] --blocksize=$[64 * 1024]
8MiB 2.95M/s 4MiB 5.6M/s 2MiB 3.79M/s 1MiB 4.21M/s 512KiB 2.91M/s 256KiB 1.2M/s 128KiB 967K/s 64KiB 601K/s
quite stable
i did also -a 256KiB is quite good, is it?
./flashbench -a /dev/mmcblk0p3 --open-au-nr=2 -b 1024 align 134217728 pre 1.19ms on 1.46ms post 904µs diff 414µs align 67108864 pre 1.27ms on 1.72ms post 1.02ms diff 573µs align 33554432 pre 1.19ms on 1.58ms post 890µs diff 539µs align 16777216 pre 1.13ms on 1.41ms post 866µs diff 414µs align 8388608 pre 1.09ms on 1.37ms post 915µs diff 371µs align 4194304 pre 1.04ms on 1.25ms post 993µs diff 239µs align 2097152 pre 1.05ms on 1.09ms post 1.07ms diff 29.1µs align 1048576 pre 1.03ms on 1.07ms post 1.05ms diff 30.2µs align 524288 pre 1.04ms on 1.08ms post 1.06ms diff 29µs align 262144 pre 1.01ms on 1.05ms post 1.05ms diff 16.2µs align 131072 pre 1.04ms on 1.06ms post 1.05ms diff 17.9µs align 65536 pre 1.03ms on 1.05ms post 1.05ms diff 15.6µs align 32768 pre 1.04ms on 1.07ms post 1.06ms diff 16.1µs align 16384 pre 1.02ms on 1.06ms post 1.04ms diff 27.2µs align 8192 pre 1.02ms on 1.02ms post 1.02ms diff 3.94µs align 4096 pre 1.02ms on 1.02ms post 1.01ms diff 6.89µs align 2048 pre 1.01ms on 1.03ms post 1.02ms diff 14.3µs
what i also noticed on this card is that the card is running with legacy timing instead of high-speed:
I don't really know. Best ask this question on the linux-mmc mailing list.
just to notice, i will then ask also on linux-mmc list:
i forced setting the card in high-speed mode and noticed that:
card->sw_caps.hs_max_dtr = 0
which is the max bus speed, *i think*. when i override that i get:
mmc0: Problem switching card into high-speed mode! mmc0: host does not support reading read-only switch. assuming wr ite-enable.
mmc0: new SDHC card at address e624
so most probably the card is really not a high-speed card.
i ask because someone on #linaro asked me if the device is probably not dma enabled or in 1-bit mode, which would make sense i think that if it is not dma enabled it uses cpu for everything..
however, i figured out that it is not in 1-bit mode, it is in 4-bit mode, good i guess .. but i was not able how to figure out if it is dma enabled or not. i found nothing in sourcecode but how to disable dma during loading the module, which does not apply, since the driver is compiled in.
You can pass module options through the boot loader, in the kernel command line, like 'modulename.option=value'.
yes, i know that.. i see only no way to understand if the card actually is dma or pio i only found out how to disable dma (which i don't want of course)
Also, there is no need to run the SD card test on the target hardware. Best do the same test on a PC with a USB card reader or builtin SD card slot and see if the numbers are much different. If everything's faster but the behaviour otherwise the same, there is probably also a bug in the host driver.
we already did that, also on different hardware and different kernels with linux it always differs, but it is always slow. i was very close to say the card is crap, but it's fast with macosx, so i thought card must be ok. well i see now, it depends on many factors :)
but in order to get *bonnie-values* like on macosx, it would must be kind of 9x faster. i mean.. on linux it is about 10% as on macosx. well, i start to think now that maybe bonnie is a lot different on mac and as you said bonnie isn't that good to use on SD-cards, well, maybe those numbers make no sense at all then. however, it is slow and freezing the system, so there is something wrong :)
trying different SD cards now. we will buy as much as different cards as we find in local stores tomorrow and i will send results, only tell me please which values are of interest.. i did not yet really figure out how to read the results
peter