Hi Arnd,
On Sat, Mar 05, 2011 at 10:16:45AM +0100, arnd.bergmann@linaro.org wrote:
On Saturday 05 March 2011 00:55:29 Philippe De Muyter wrote:
I have read with interest your article in lwn, and decided to try your flashbench program to discover the characteristics of the CF card we use.
Unfortunately,
./flashbench -a -b 1K /dev/sdb
fails with endless :
time_read: Invalid argument
Looking with strace, I get e.g.:
pread64(3, 0xb3728000, 1, 1023410175) = -1 EINVAL (Invalid argument)
Is that a behavior you can explain (and fix) ?
Yes, there are two known problems that I need to fix:
- flashbench uses O_DIRECT for talking to the device, which means that
all accesses must be on multiples of full sectors based on the underlying device sector size. It should detect this
- command line arguments currently need to be natural numbers. There
is no parser for interpreting arguments like 1K or 4M as kilobytes and megabytes.
Oops. Sorry and thanks for the quick answer.
It should work when you do
./flashbench -a -b 1024 /dev/sdb
Arnd
Of course it works better now, but I cannot get rid of an error message at startup :
tmp179:/home/lcr/flashbench # ./flashbench -a -b 1024 /dev/sdb sched_setscheduler: Operation not permitted align 67108864 pre 339µs on 338µs post 339µs diff -694ns align 33554432 pre 340µs on 338µs post 337µs diff -687ns align 16777216 pre 339µs on 338µs post 338µs diff -768ns align 8388608 pre 337µs on 337µs post 339µs diff -686ns align 4194304 pre 340µs on 341µs post 341µs diff 77ns align 2097152 pre 339µs on 340µs post 337µs diff 2.23µs align 1048576 pre 340µs on 341µs post 339µs diff 2.09µs align 524288 pre 338µs on 341µs post 339µs diff 2.21µs align 262144 pre 341µs on 340µs post 339µs diff 572ns align 131072 pre 341µs on 339µs post 339µs diff -211ns align 65536 pre 340µs on 341µs post 337µs diff 2.29µs align 32768 pre 341µs on 343µs post 342µs diff 1.69µs align 16384 pre 342µs on 343µs post 341µs diff 1.97µs align 8192 pre 340µs on 341µs post 339µs diff 1.43µs align 4096 pre 342µs on 343µs post 340µs diff 2.22µs align 2048 pre 342µs on 343µs post 342µs diff 1.41µs tmp179:/home/lcr/flashbench #
I have stopped apparmor, but that didn't make the message disappear. Are the outputs still meaningfull ?
Philippe