summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-16Fio 3.22fio-3.22Jens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-14Merge branch 'issue-1065' of https://github.com/XeS0r/fio into masterJens Axboe
* 'issue-1065' of https://github.com/XeS0r/fio: thread_options: Use unsigned int type for exit_what and stonewall Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-15thread_options: Use unsigned int type for exit_what and stonewallAndré Wild
Fixes: 64402a8 ("Expand choices for exitall") Fixes: https://github.com/axboe/fio/issues/1065 Signed-off-by: André Wild <wild.andre.ae@gmail.com>
2020-08-14Fixup examples/exitwhat.fioJens Axboe
Use proper read/write names. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-13zbd: use ->min_zone, ->max_zone in more placesAlexey Dobriyan
Check that ->min_zone is less than ->max_zone. This assert found one bug here. Use it in more places, now that it was added. Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-12io_u: calculate incremental residuals correctlyJens Axboe
We need to use the transfer buffer length for the residual calculation, otherwise multiple shorts on the same IO will not calculate the right value. Fixes: 5fff95436922 ("Add support for >= 4G block sizes") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-11t/zbd: check log file for failed assertionsDmitry Fomichev
Currently, a ZBD test can succeed even if an fio assertion is raised during its run. Search every ZBD test log file for failed assertions and fail the test if any were found. Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-11zbd: simplify zone reset codeDmitry Fomichev
zbd_reset_range() function is only called once from zbd_reset_zone() and it is always called for an individual zone, not a range. Make zone reset flow simpler by moving all the code needed to reset a single zone from zbd_reset_range() to zbd_reset_zone(). Therefore, zbd_reset_range() is now dropped. zbc_reset_zone() is always called with the zone already locked. Remove recursive zone locking inside this function and add a note in the description of this function saying that the caller is expected to have the zone locked when calling it. Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-11configure: check if pkg-config is installedDmitry Fomichev
A few libraries need to be newer than a specific version in order to be supported by fio and pkg-config utility is used to verify the versions of the installed libraries. Since this step may fail because pkg-config is not installed, verify pkg-config presence and warn the user if it could not be found. To avoid code duplication, add a common helper function to perform these checks. Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-11configure: improve libzbc version checkDmitry Fomichev
Avoid parsing pkg-config output and just use --atleast-version to check if libzbc is present and has an up to date version. Currently, support for libzbc ioengine is always included if libzbc is found at the build system. Add the option to disable libzbc ioengine support even if libzbc is found. This can be useful for cross-compilation. Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10io_u: set io_u->verify_offset in fill_io_u()Jens Axboe
This is arguably saner than the previous fix, since it also catches cases where io_u->offset is adjusted later on. Hopefully that's it... Fixes: 4fff54ccba73 ("verify: use origina offset for verification") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10io_u: get_next_offset() should always set io_u->verify_offsetJens Axboe
Don't assume that the original get_next_block() is the only place that sets it. Set it unconditionally at the success exit path of get_next_offset(). Fixes: 4fff54ccba73 ("verify: use origina offset for verification") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10verify: use origina offset for verificationJens Axboe
Requeued IO might have a different offset, since we increment it for retry conditions. Store the original offset for verification purposes. Just like we have io_u->xfer_buf/io_u->buf and io_u->xfer_buflen/io_u->buflen, we really should be treating io_u->offset the same. But that's a major change, so just add this special original offset so we know that verify has it. Currently we treat io_u->offset like we would have io_u->xfer_offset, so this just makes io_u->verify_offset what io_u->offset should be. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10io_uring: notice short IO on completion pathJens Axboe
Async IO engines need to signal residual from the completion path, but we completely ignore those. Ensure we properly requeue IO that was short, after adjusting the state. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10io_u: reset ->resid on starting a requeue IOJens Axboe
We only clear this state for a new IO, we should also do it for starting a requeued IO. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-10engines/io_uring: make sure state is updated for requeuesJens Axboe
Currently we always use the start of the buffer and buffer length, but this isn't valid for a requeue. Make sure we updated both based on the actual io_u. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-08-07Merge branch 'master' of https://github.com/donny372/fio into masterJens Axboe
* 'master' of https://github.com/donny372/fio: Add support for reading iolog from stdin.
2020-08-07Add support for reading iolog from stdin.donny372
Add support for reading iolog from stdin and update HOWTO and man page. Fixes: https://github.com/axboe/fio/issues/997 Signed-off-by: Shundong Zhou <donny372@gmail.com>
2020-08-01Merge branch 'master' of https://github.com/bvanassche/fio into masterJens Axboe
* 'master' of https://github.com/bvanassche/fio: Prevent that fio hangs when using io_submit_mode=offload
2020-08-01Prevent that fio hangs when using io_submit_mode=offloadBart Van Assche
This patch has been tested by running the following shell command: for ((i=0;i<1000;i++)); do echo $i; python3 t/run-fio-tests.py -o 10; done Fixes: d28174f0189c ("workqueue: ensure we see deferred error for IOs") Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2020-07-27iolog: ensure that dynamic log entries are at least queue depth sizedJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-07-27Add roundup_pow2() as a generic helperJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-07-26t/jobs/t001[1-2].fio: run for 10 seconds instead of 3Jens Axboe
These jobs often fails in CI testing, and it might be because the runtime is simply too short to make it reliable. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-07-26Merge branch 'fix_travis_libiscsi' of https://github.com/sitsofe/fioJens Axboe
* 'fix_travis_libiscsi' of https://github.com/sitsofe/fio: travis: fix x86 libiscsi detection travis: remove unneeded dependency
2020-07-26travis: fix x86 libiscsi detectionSitsofe Wheeler
When cross compiling to 32 bit systems, pkg-config has to find 32 bit libraries. This can be done by one of the following - Setting PKG_CONFIG_PATH/PKG_CONFIG_LIBDIR to an appropriate directory - Using a 32 bit pkg-config binary Choose the later for now by installing a 32 bit pkg-config (which will replace the 64 bit one). This should fix failing CI on the 32 bit x86 build. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: remove unneeded dependencySitsofe Wheeler
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26Merge branch 'enable_or_exit' of https://github.com/sitsofe/fioJens Axboe
* 'enable_or_exit' of https://github.com/sitsofe/fio: configure: fail when explicit enabling doesn't succeed
2020-07-26configure: fail when explicit enabling doesn't succeedSitsofe Wheeler
- Bail out if the probe fails when the user is explicitly enabling the cuda, libiscsi or libnbd ioengines or the libaio io_uring option - Normalize some of the code that deals with enabling/disabling the above options Fixes: https://github.com/axboe/fio/issues/1052 Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26Merge branch 'travis_cleanup' of https://github.com/sitsofe/fioJens Axboe
* 'travis_cleanup' of https://github.com/sitsofe/fio: Makefile: fix incorrectly set libiscsi cflags memory: fix incorrect pointer comparison when freeing cuda memory travis: make CI install script bail out on first error travis: enable libiscsi and cuda ioengines travis: add dependency for cuda ioengine travis: use install section instead of before_install section configure: check for Debian/Ubuntu tcmalloc_minimal travis: improve installation dependencies travis: simplify yml file
2020-07-26Makefile: fix incorrectly set libiscsi cflagsSitsofe Wheeler
This fixes the warning error: -liscsi: 'linker' input unused [-Werror,-Wunused-command-line-argument] produced by clang. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26memory: fix incorrect pointer comparison when freeing cuda memorySitsofe Wheeler
This fixes the following warning spotted by gcc 7: memory.c: In function ‘free_mem_cudamalloc’: memory.c:277:22: error: comparison between pointer and integer [-Werror] if (td->dev_mem_ptr != NULL) ^~ Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: make CI install script bail out on first errorSitsofe Wheeler
This avoids the issue where we carry on when we can't find a requested package to install. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: enable libiscsi and cuda ioenginesSitsofe Wheeler
...but only specific Linux setups. We have to avoid enabling cuda on i386/arm64 as we don't have the dependency in those environments so introduce a CI_TARGET_ARCH variable and do some refactoring. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: add dependency for cuda ioengineSitsofe Wheeler
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: use install section instead of before_install sectionSitsofe Wheeler
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26configure: check for Debian/Ubuntu tcmalloc_minimalSitsofe Wheeler
Debian derived distros have a libtcmalloc-minimal4 package that only has a versioned libtcmalloc_minimal.so.4 inside, so try explicitly searching for it when looking for tcmalloc. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: improve installation dependenciesSitsofe Wheeler
- On Ubuntu add bison/flex dependencies for lex arithmetic, add libgoogle-perftools-dev so we can link against tcmalloc. - Invoke pip3 just the once on macOS Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-26travis: simplify yml fileSitsofe Wheeler
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-25Merge branch 'test-cleanup' of https://github.com/vincentkfu/fioJens Axboe
* 'test-cleanup' of https://github.com/vincentkfu/fio: t/run-fio-tests: add description to each test result line ci: set PYTHONUNBUFFERED=TRUE t/run-fio-tests: fix issues identified by pylint3 and pyflakes3 t/run-fio-tests: catch modprobe exceptions
2020-07-25Merge branch 'check-atomics' of https://github.com/sitsofe/fioJens Axboe
* 'check-atomics' of https://github.com/sitsofe/fio: configure: check for C11 atomics support
2020-07-25t/run-fio-tests: add description to each test result lineVincent Fu
Since no one remembers what the test numbers actually refer to, include either the job name or executable in each test result line.
2020-07-25ci: set PYTHONUNBUFFERED=TRUEVincent Fu
Set this environment variable so that the build output is consistent across the different environments.
2020-07-25t/run-fio-tests: fix issues identified by pylint3 and pyflakes3Vincent Fu
- fix whitespace issue in function parameter list - eliminate extra 'requirements' key for t0012 - t0013 does not need a separate test class - specify string format arguments as logging function parameters
2020-07-25t/run-fio-tests: catch modprobe exceptionsVincent Fu
Catch exceptions that occur when running modprobe in case the build environment has it disabled (e.g., AWS CodeBuild).
2020-07-25configure: check for C11 atomics supportSitsofe Wheeler
Since 3932f8be718fc4ca3b863c51c0d567821d75c003 ("arch/arch.h: Introduce atomic_{load_acquire,store_release}()") fio has needed C11 atomic support and this is only provided from gcc 4.9 / clang 3.6 onwards (http://stdatomic.gforge.inria.fr/#sec-2 ). Make this clearer by doing the following: - Add configure check for C11 atomics support and bail out with a (friendly) message pointing at compiler version if it's not there - Remove the minimum compiler version check from compiler.h as it is now redundant I've avoided doing an explicit compiler version check because Apple's clang can have a wildly different version to upstream (https://stackoverflow.com/a/33614612 ). Tested on: - CentOS 7 with default gcc 4.8.5 (correctly errors with message) - CentOS 7 docker container using llvm-toolset-7 to provide clang 5.0.1 (works) - CentOS 7 docker container using devtool-toolset-7 to provide gcc 7.3.1 (works) - Ubuntu 16.04 with clang-3.5 (correctly errors with message) - Ubuntu 16.04 with clang-3.6 installed (works) - macOS 10.14.6 with clang-1001.0.46.4 (works) v2: - Rebase - Reword failure message and stop mentioning fio version number Fixes: https://github.com/axboe/fio/issues/1047 Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2020-07-25configure: error early on too old compierJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-07-24Merge branch 'sribs-patch-1039' of https://github.com/sribs/fioJens Axboe
* 'sribs-patch-1039' of https://github.com/sribs/fio: stat: stop triggerring division by zero on bandwidth lower than 1KBps io_u: fix exit failure case when using rates and timeout
2020-07-24stat: stop triggerring division by zero on bandwidth lower than 1KBpssribs
Before the integer arithmetic is performed to obtain percentage of aggregation this conversion of rs->agg[ddir] into KBytes could potentially turn out to be 0. Adjust stat.c to no longer trigger division by zero on bandwidths greater than 0 but less than 1kilobyte a second. The fact that this is performed on multiple occasions, a function is preferred Signed-off-by: sribs <sribs@microsoft.com>
2020-07-24io_u: fix exit failure case when using rates and timeoutsribs
Previously when using a rate smaller than the minimum block size, fio could end up failing to exit at a designated timeout and while doing this, do check if usec takes in negative values which could potentially not exit fio indefinitely. Fixes: https://github.com/axboe/fio/issues/1039 Signed-off-by: Sriharsha B S <sribs@microsoft.com>
2020-07-22t/zbd: Improve pass condition of test case #49Shin'ichiro Kawasaki
The test case #49 runs write workloads with verify option. It checks read bytes for verify, but it does not check written bytes. To make test pass condition more accurate, add check of the written bytes. Fixes: 4844bb4716ab ("t/zbd: Add test case to check zonecapacity option") Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>