diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-01-05 12:27:57 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-01-05 12:27:57 +0100 |
commit | ca0433fc4fb4dfdd6f5574fee1f0c3f63aafffd4 (patch) | |
tree | 6cfa4eb1f4a263fe9e159b39d6029483baa1d5eb | |
parent | f3013c74a846294cfd250663bd893b86037f1c3d (diff) | |
download | flashbench-ca0433fc4fb4dfdd6f5574fee1f0c3f63aafffd4.tar.gz |
flashbench: add test for number of open AUs
The new test case writes data to random positions
in a varying number of AUs, using varying block
sizes.
Example output:
1 AU 2 AU 3 AU 4 AU 5 AU 8 AU
4MiB 8.98M/s 8.99M/s 9.01M/s 9M/s 8.99M/s 9M/s
2MiB 9.09M/s 6.88M/s 7.55M/s 6.85M/s 4.84M/s 4.84M/s
1MiB 7.59M/s 7.47M/s 3.81M/s 2.59M/s 2.55M/s 2.55M/s
512KiB 8.42M/s 7.54M/s 1.82M/s 1.69M/s 1.35M/s 1.31M/s
256KiB 9.01M/s 8.18M/s 1.22M/s 778K/s 681K/s 681K/s
128KiB 7.79M/s 7.27M/s 1.02e+0 816K/s 358K/s 340K/s
64KiB 12.1M/s 11.2M/s 4.7M/s 4.19M/s 336K/s 173K/s
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | flashbench.c | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/flashbench.c b/flashbench.c index 7b7f402..b9f4216 100644 --- a/flashbench.c +++ b/flashbench.c @@ -462,7 +462,7 @@ static int try_program(struct device *dev) }; #endif -#if 1 +#if 0 /* show effect of type of access within AU */ struct operation program[] = { /* loop through power of two multiple of one sector */ @@ -514,6 +514,60 @@ static int try_program(struct device *dev) call(program, dev, 0, 4096 * 1024, 0); #endif + /* find maximum number of open AUs */ + struct operation program[] = { + /* loop through power of two multiple of one sector */ + {O_LEN_POW2, 7, -(64 * 1024)}, + {O_SEQUENCE, 3}, + /* print block size */ + {O_DROP}, + {O_PRINTF}, + {O_FORMAT}, + {O_LENGTH}, + /* start four units into the device, to skip FAT */ + {O_OFF_FIXED, .val = 1024 * 4096 * 4}, {O_DROP}, + /* print one line of aggregated + per second results */ + {O_PRINTF}, {O_FORMAT}, + {O_SEQUENCE, 6}, + /* linear write 0x5a */ + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 1, 4096 * 1024}, {O_WRITE_RAND}, + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 2, 4096 * 1024}, {O_WRITE_RAND}, + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 3, 4096 * 1024}, {O_WRITE_RAND}, + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 4, 4096 * 1024}, {O_WRITE_RAND}, + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 5, 4096 * 1024}, {O_WRITE_RAND}, + {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3}, + {O_REDUCE, .aggregate = A_AVERAGE}, + {O_OFF_RAND, 8192, -1}, + {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS}, + {O_OFF_LIN, 8, 4096 * 1024}, {O_WRITE_RAND}, + {O_END}, + {O_NEWLINE}, + {O_END}, + {O_END}, + }; + call(program, dev, 0, 4096 * 1024, 0); + return 0; } |