diff options
| author | Mikhail Kshevetskiy <[email protected]> | 2025-09-30 14:03:01 +0300 |
|---|---|---|
| committer | Michael Trimarchi <[email protected]> | 2025-10-05 20:26:49 +0200 |
| commit | e700a84292ba3a38c32d4ac51179863ca8ebc499 (patch) | |
| tree | 4c28e3d55fbe2c2e2782fea1820399956fc49e31 /include | |
| parent | 642f150bcd5f0ae271d2b99b428e8487b5adf070 (diff) | |
cmd: mtd: fix speed measurement in the speed benchmark
The shown speed is inversely proportional to the data size.
See the output:
spi-nand: spi_nand nand@0: Micron SPI NAND was found.
spi-nand: spi_nand nand@0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
...
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x40000
Reading 262144 byte(s) (128 page(s)) at offset 0x00000000
Read speed: 63kiB/s
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x20000
Reading 131072 byte(s) (64 page(s)) at offset 0x00000000
Read speed: 127kiB/s
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x10000
Reading 65536 byte(s) (32 page(s)) at offset 0x00000000
Read speed: 254kiB/s
In the spi-nand case 'io_op.len' is not always the same as 'len', thus
we are using the wrong amount of data to derive the speed.
Also make sure we are using 64-bit calculation to get a more precise
results.
Fixes: d246e70cf81d0 ("cmd: mtd: Enable speed benchmarking")
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
