Age | Commit message (Collapse) | Author |
|
Bug: 28866589
Change-Id: Ie55f992cfe782027f3f5e505284b35d9b728c239
|
|
Bug: 28866589
Change-Id: I4f60413e25407a57b8672a72fce8316139012149
|
|
This helps with TLC memory when while guessing the erase block size,
so that the guessed erase block start is at the start of the actual
erase block.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This avoids link errors that people have reported
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Apparently, 1.5 MB erase blocks or multiples of that are more
common than I first thought, so automatically try to handle these
by starting at a multiple of the erase blcok.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This makes it easier to do the --open-au test case
on drives whose erase block is not a power of two.
Note that for those, you have to pass a blocksize
that is also not a power of two, but a fraction
of the erase size, e.g.
flashbench --open-au --random --open-au-nr=6 \
--erasesize=$[3 * 1024 * 1024] \
--blocksize=$[24 * 1024] \
--offset=$[24 * 1024 * 1024] \
/dev/sde
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This function is needed for certain USB sticks that
use an odd erase block size (4128 KiB in one case).
We will probably need this later, commit it as unused
for now.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Using every other erase block is bad when you have
guessed the erase block size incorrectly. Better
skip three for each one we test, to have a better
chance of actually hitting separate erase blocks.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
We want to compute the bytes per second from the average of the
times it takes to read many sectors, not compute the average of
the throughput, which is somewhat different and less interesting.
Also, use only one try for the --open-au test, instead of the
maximum of three.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Turns out a bit too much, and might hide some effects.
Also, using something just below a power of two works
better, so use 7 now.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Incorrect type conversion results in potentially
negative time values.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Random needs to be applied to blocks in the segment,
not the order of blocks.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This adds an explanation about how to find the number
of open segments/eraseblocks.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This adds a little introductory file describing
how to use flashbench. Needs more text still.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This reverts commit eefa89baa9800a3904d4ada44a61132f299a6633.
Actually, I still want this back.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
With this change, the program basically gets usable
from the command line.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Recompiling flashbench every time to run it
with different arguments sucks, so allow
the find-fat test to be run from the command
line, with all necessary args for tuning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
These turned out to be pretty useless, so I'll just
remove them. If someone wants them back, they are
still in the git history and we can write them in
using our program language.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This is currently unused, but will be used to simplify
running the programmed tests.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This has been annoying me for far too long, time to
fix it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
obvious typo fix
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Bytes and nanoseconds are relatively impractical,
so print them in units that are easier to process
with gnuplot.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
The linear feedback shift register used to create
pseudorandom numbers cycles through all possible
values, but not zero. Add a special case for this.
The result is that zero is always the last number.
This guarantees that any sequence can not be sorted,
even for very small sets.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This trivial tool can be used to erase block devices
using the BLKDISCARD ioctl. The tool does nothing
but calling that ioctl with the command line arguments.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This fixes all warnings and one confusion of off_t and size_t
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Erasing blocks has a huge impact on timing, we need to test this.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This fixes inconsistencies in the output.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
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>
|
|
All pretty-printed output is now 8 characters wide.
Indent the program by four spaces, not tabs, so it
fits better here.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
A new O_BPS code is used to convert from length
and ns to bytes per second, and the O_FORMAT
operation can pretty-print this.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This adds the same lfsr function to the vm
that was already in the base flashbench,
for doing random read/write offset tests.
Something was wrong in the buffer logic,
rewrote it to make sure we have the right
data in zero/ones/rand write buffers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
In a O_OFF_LIN or O_OFF_RAND series, autofill
until max using the current length.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This makes it possible to use three kinds of
write operations, writing zero-, one- or
somwhat random contents. Many media have different
characteristics depending on the kind of content.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This lets us print more meaningful output.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Finally, we can actually read from the device
to do measurements with the vm. Start with a
simple test case using the '-p' option in
the main flashbench.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This makes it possible to call programs from
outside of vm.c, and moves all device access
to dev.c, as a step towards integrating the
flashbench front-end with the vm.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
- add newline command shortcut
- change indentation of pseudo programs
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Need a way to ignore results.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Lots of small changes.
Sequence now folds the result if there is only one.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
It's now possible to run the first bogus test
without crashing.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Instead of just returning NULL, this now prints an
error message and back trace.
The main function can test the interpreter.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This also passes down types and array sizes.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Rudimentary for now, just collect data, not
sizes and type.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This changes the code to use a union of
integer, string and pointer as the result
type, so we can have nesting arrays.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
This is the start of a rewrite of the entire program,
based on the idea of defining test cases dynamically
in pseudo-code. A test case is written as a C data
structure containing basic operations (read, write,
erase, ...), output (text, times, ...) and loops
to repeat operations with different positions and
sizes.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|