On Monday 25 February 2013, Grant Grundler wrote:
On Sat, Feb 23, 2013 at 1:48 PM, Arnd Bergmann arnd@arndb.de wrote: ...
$ sudo ./flashbench --open-au /dev/mmcblk0 --erasesize=$[12*1024*1024] --blocksize=$[3*4096]
Arnd, I'm curious: why did you chose "3*4096" instead of "4*4096" given the previous comment? Mixing up 12MB with 12KB?
I never got around to teach flashbench about eraseblocks that have a non-power-of-two number of pages. If I do the above, there are 1024 logical "blocks" in an eraseblock, which works around this limitation, although not too well.
Ah ok! I was reading "--blocksize $[3*4096]" as IO transaction size in bytes (12KB) and not as the erase block size in KB (12MB).
You were reading correctly. "--erasesize" is the erase block size in bytes, while "--blocksize" is the minimum transfer size in bytes. flashbench tries all power-of-two multiples of blocksize starting with erasesize but does not work if erasesize is not a power-of-two multiple of blocksize.
Arnd