]> www.infradead.org Git - mtd-utils.git/commit
mtd-utils: flash_speed: Measure read while write latency
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 10 Nov 2022 15:59:38 +0000 (16:59 +0100)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Fri, 18 Nov 2022 19:44:46 +0000 (20:44 +0100)
commita61e2d93c7cbfe3d9311349ad789b9e4e9a16105
treebadac9c379fa6d1a236cd6207701f07ccaca8bad
parentac03af0f56c4d9cffb56b958f38b57dc832340fe
mtd-utils: flash_speed: Measure read while write latency

The Read While Write (RWW) feature allows to perform reads from the
flash array into cache while a program (from cache) or an erase
operation happens, provided that the two areas are located on different
banks.

The main benefit is the possible reduced latency when requesting to read
a page while a much longer operation is ongoing, like a write or an
erase.

We can try to compare the positive impact of such a feature by enhancing
the flash_speed test tool with the following test:
- Measure the time taken by an eraseblock write in parallel with an
  eraseblock read.
- Measure when the read operation ends.
- Compare the two to get the latency saved with the RWW feature.

To be sure the mtd_write actually starts (and acquires the necessary
locks) before the mtd_read does, we use SCHED_FIFO at rather high
(arbitrary) priorities, respectively 42 and 41.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
tests/mtd-tests/Makemodule.am
tests/mtd-tests/flash_speed.c