From a61e2d93c7cbfe3d9311349ad789b9e4e9a16105 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Thu, 10 Nov 2022 16:59:38 +0100 Subject: 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 Signed-off-by: David Oberhollenzer --- tests/mtd-tests/Makemodule.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/mtd-tests/Makemodule.am') diff --git a/tests/mtd-tests/Makemodule.am b/tests/mtd-tests/Makemodule.am index d849e3c..d02e9e4 100644 --- a/tests/mtd-tests/Makemodule.am +++ b/tests/mtd-tests/Makemodule.am @@ -7,9 +7,12 @@ flash_stress_LDADD = libmtd.a flash_stress_CPPFLAGS = $(AM_CPPFLAGS) flash_speed_SOURCES = tests/mtd-tests/flash_speed.c -flash_speed_LDADD = libmtd.a +flash_speed_LDADD = libmtd.a $(PTHREAD_LIBS) flash_speed_CPPFLAGS = $(AM_CPPFLAGS) +flash_speed_LDADD += $(PTHREAD_CFLAGS) +flash_speed_CPPFLAGS += $(PTHREAD_CFLAGS) + nandbiterrs_SOURCES = tests/mtd-tests/nandbiterrs.c nandbiterrs_LDADD = libmtd.a nandbiterrs_CPPFLAGS = $(AM_CPPFLAGS) -- cgit v1.2.3