path: root/configure
AgeCommit message (Collapse)Author
2021-06-09configure: silence "pkg-config: not found"Tomohiro Kusumi
Do what check_min_lib_version() does to not print the error message when pkg-config doesn't exist. -- DAOS File System (dfs) Engine no ./configure: pkg-config: not found NFS engine no Signed-off-by: Tomohiro Kusumi <>
2021-05-18Merge branch 'taras/nfs-upstream' of Axboe
* 'taras/nfs-upstream' of clean up nfs example skip skeleton comments single line bodies C-style comments NFS configure fixes NFS engine
2021-05-06configure: fix check_min_lib_version() evalStefan Hajnoczi
The following shell statement: if eval "echo \$$_feature" = "yes" ; then executes: echo $... = "yes" It does not actually compare the variable named by $_feature to the string "yes". Add the missing "test" call so the comparison happens as intended and wrap the eval so it doesn't include the = "yes". Fixes: 3e48f7c9de61 ("configure: fix syntax error with NetBSD") Cc: Dmitry Fomichev <> Signed-off-by: Stefan Hajnoczi <> Signed-off-by: Jens Axboe <>
2021-04-20NFS configure fixesTaras Glek
2021-04-12NFS engineTaras Glek
2021-03-30configure: add test case for pthread_getaffinity_np()Jens Axboe
Signed-off-by: Jens Axboe <>
2021-03-18Merge branch 'add-librpma-engines' of Axboe
* 'add-librpma-engines' of rpma: add librpma_apm_* and librpma_gpspm_* engines
2021-03-17engines/dfs: add DAOS File System (dfs) engineJohann Lombardi
DAOS is a new scale-out open-source object store. See for more information. This patch adds a new fio engine to support the filesystem layer built on top of DAOS called DFS (DAOS File System). It supports asynchronous read/write operations. Signed-off-by: Johann Lombardi <> Co-authored-by: Mohamad Chaarawi <> Co-authored-by: Vishwanath Venkatesan <> Co-authored-by: Ioannis Galanis <>
2021-03-17Disable pthread_condattr_setclock on cygwinJohann Lombardi
Signed-off-by: Johann Lombardi <>
2021-03-13rpma: add librpma_apm_* and librpma_gpspm_* enginesJan Michalski
The Remote Persistent Memory Access (RPMA) Library is a C library created to simplify accessing persistent memory on remote hosts over Remote Direct Memory Access (RDMA). The librpma_apm_client and librpma_apm_server is a pair of engines which allows benchmarking persistent writes achieved via the Appliance Persistency Method (APM; natively supported by the librpma library) and regular reads (a part of the RDMA standard). The librpma_gpspm_client and librpma_gpspm_server is a pair of engines which allows benchmarking persistent writes achieved via the General Purpose Persistency Method (GPSPM; build on top of the librpma API). The librpma library is available here: along with the set of scripts using the newly introduced engines to construct miscellaneous benchmarking scenarios: The full history of the development of the librpma fio engines is available at: Co-Authored-By: Lukasz Dorau <> Co-Authored-By: Tomasz Gromadzki <> Co-Authored-By: Jan Michalski <> Co-Authored-By: Oksana Salyk <>
2021-03-06configure: remove unused CLOCK_MONOTONIC_* symbolsFotis Xenakis
The symbols are not used in the code and the respective probes were removed in commits 187f39063e1b0a7baeda20a9f4f2406327ec0d41 and 69212fc41c0420f8caf272a0cc270194edbddfe7. Signed-off-by: Fotis Xenakis <>
2021-01-27fio: fix detecting libpmemLukasz Dorau
The current test for libpmem in 'configure' fails in the following way: $ gcc test.c -lpmem test.c: In function ‘main’: test.c:6:27: warning: passing argument 2 of ‘pmem_is_pmem’ \ makes integer from pointer \ without a cast [-Wint-conversion] 6 | rc = pmem_is_pmem(NULL, NULL); | ^~~~ | | | void * In file included from test.c:1: /usr/include/libpmem.h:92:43: note: expected ‘size_t’ \ {aka ‘long unsigned int’} but argument \ is of type ‘void *’ 92 | int pmem_is_pmem(const void *addr, size_t len); | ~~~~~~~^~~ Fix it.
2021-01-21configure: ESX does not have timerfd supportBrian 'Redbeard' Harrington
Running fio on an ESX host fails due to the lack of support for file descriptor based notifications of timer expiration. This change bypasses patch 696378af added to increase timer accuracy. Signed-off-by: Brian 'Redbeard' Harrington <>
2021-01-12Merge branch 'osx_fix' of Axboe
* 'osx_fix' of configure: fix compilation on recent macOS Xcode versions
2020-12-26configure: fix compilation on recent macOS Xcode versionsSitsofe Wheeler
Back in ccf2d89d39b21bc8c7b497b40be5b82eadb80863 ("configure: try to disable weak linking on OSX") disabling weak symbols was done to prevent depending on features when building on a newer macOS but targeting an older one. Fast-forward to Xcode 11.4 and it turns out Apple have broken this by depending on weak symbols for critical symbols like FD_SET leading to compilation errors like the following ld: weak import of symbol '___darwin_check_fd_set_overflow' not supported because of option: -no_weak_imports for architecture x86_64 Other people/projects have been hit by this issue: - - but Apple have kept this behaviour into XCode 12 so we should adapt. - Introduce the concept of configure only CFLAGS - Switch to using -Werror=partial-availability with the above - Stop logging a message about disabling weak linking The above should avoid finding features the target platform doesn't have while allowing weak linking. The name CONFIGURE_CFLAGS is used to remain similar to QEMU's configure. Fingers crossed this approach stays supported by Apple... Fixes Signed-off-by: Sitsofe Wheeler <>
2020-12-26windows: drop XP supportSitsofe Wheeler
Windows 2003 has been EOL since 2015 and Windows XP has been EOL since 2014. Technically fio hasn't been properly targetting XP anyway - (see 16d40a15783f9181d64082fc00a970dff485798f 'configure: be explicit about "XP" Windows API version'). - Strip out support for XP and change the documentation to no longer mention it - Stop targetting XP in the CI 32 bit build Next stop, Windows 7... Signed-off-by: Sitsofe Wheeler <>
2020-12-05ioengine: Add libcufile I/O engineBrian T. Smith
The libcufile I/O engine uses NVIDIA GPUDirect Storage (GDS) cuFile API to perform synchronous I/O directly against GPU buffers via nvidia-fs and a GDS-supported filesystem. 'configure --enable-libcufile' enables the libcufile engine. CFLAGS must specify the location of CUDA and cuFile headers. e.g. CFLAGS="-I/usr/local/cuda/include -I/usr/local/cuda/lib64" LDFLAGS must specify the location of CUDA and cuFile libraries. e.g. LDFLAGS="-L/usr/local/cuda/lib64" The paths used in CFLAGS and LDFLAGS depend upon the build host's CUDA installation. libcufile adds the following optons: gpu_dev_ids, cuda_io Usage is documented in HOWTO, fio.1, examples/libcufile-cufile.fio and examples/libcufile-posix.fio. Note that enabling verify when cuda_io=cufile necessitates cudaMemcpy() to populate the GPU buffer on a write and populate the CPU buffer on a read. The primary goal of GDS is to not copy data between CPU and GPU buffers. Signed-off-by: Brian T. Smith <>
2020-11-09configure: remove libaio-uring remnantJens Axboe
This was missed in the previous patch. Fixes: d4946e79e833 ("Remove the "libaio over io_uring" mode") Signed-off-by: Jens Axboe <>
2020-11-09Remove the "libaio over io_uring" modeJens Axboe
Not going to maintain this mode in liburing, so just get rid of it. It's also caused some confusion where users think they need this enabled to run io_uring, which isn't the case. Signed-off-by: Jens Axboe <>
2020-09-25helper_thread: Increase timer accuracyBart Van Assche
The helper_thread uses select() to wait for the next event. select() rounds up its timeout argument to 1 / HZ. Increase timer accuracy by using a high-res timer if possible. This patch has been tested by running the following fio command and by verifying that the next_log and msec_to_next_event were always above 100 ms: ./fio --debug=helperthread --bandwidth-log --write_bw_log=log --log_avg_msec=1000 --ioengine=null --name=null --size=1G --rw=randwrite --loops=999999 --runtime=60 Signed-off-by: Bart Van Assche <>
2020-09-20gettime: Introduce fio_get_mono_time()Bart Van Assche
Introduce a new function for querying the monotonic clock, something that is necessary in every context where relative time is measured and where wall clock time jumps should have no effect. Remove fill_clock_gettime() since the only contexts where CLOCK_MONOTONIC_RAW are used are get_cycles_per_msec() and --clocksource=clock_gettime. I think both contexts should use CLOCK_MONOTONIC instead of its raw variant such that the values read from the clock are frequency adjusted (a computer clock crystal can deviate up to 500 ppm from its nominal frequency). This patch improves accuracy of the helper_thread code on Darwin. Darwin supports CLOCK_MONOTONIC but not pthread_condattr_setclock(). In other words, this patch causes the helper thread code to switch from the real-time clock to the monotonic clock on Darwin. Signed-off-by: Bart Van Assche <>
2020-09-20configure: Remove the CLOCK_MONOTONIC_PRECISE probeBart Van Assche
CLOCK_MONOTONIC_PRECISE is not used in the fio source code. Hence use the probe for that constant. The removed test was introduced by commit 67bf982340d9 ("Add configure script"). Signed-off-by: Bart Van Assche <>
2020-09-12configure: cleanup lex/yacc testsSitsofe Wheeler
- Switch to prebuilt function for finding executable - Search for the fl library from flex too - Test lex command output directly This allows lexing to be more likely to be found (e.g. MSYS2 but sadly not MSYS2 Mingw-w64). Signed-off-by: Sitsofe Wheeler <>
2020-09-12configure/Makefile: add option to generate pdb symbolsSitsofe Wheeler
Recent versions of Windows clang and LLVM's lld have the ability to build Windows PDB symbols for debugging so add an explicit option to test for support and use it so. Signed-off-by: Sitsofe Wheeler <>
2020-09-12configure: be explicit about "XP" Windows API versionSitsofe Wheeler
With a Cygwin Mingw-w64 environment, when an explicit Windows API version define isn't set the Windows Server 2003 API is targeted ( ). This means the XP build was actually misnamed and have never been fully compatible with plain XP for many years (I suspect such binaries will likely still work on XP bar trying to use the net ioengine)... With an MSYS2 Mingw-w64 environment, the default Windows API version is Windows 7 ( ) which breaks an "XP" build because we were were relying on the default being 2003. Fix this by making the "XP" build explicitly target the Windows Server 2003 API. Signed-off-by: Sitsofe Wheeler <>
2020-09-12configure: pass non-null pointer to (v)asprintfSitsofe Wheeler
Windows clang warns about redefinition of (v)asprintf when targeting Windows 7 because the configure test failed due to passing NULL when to those functions when they tag key parameters with the nonnull attribute. Signed-off-by: Sitsofe Wheeler <>
2020-09-07Kill off old GUASI IO engineJens Axboe
This library never saw widespread use, and it hasn't been updated in more than a decade. On top of that, the fio engine was broken for a long time and nobody noticed. Time to take it out behind the barn. Signed-off-by: Jens Axboe <>
2020-09-06Makefile/configure: fix guasi buildSitsofe Wheeler
2020-08-21engines/libpmem: adjust for PMDK >=1.5 usageŁukasz Stolarczuk
- libpmem engine adjusted to take full advantage of new PMDK versions, - code redundancy cleaned (some code was copy-pasted from PMDK), - libpmem example adjusted. Behavior of direct and sync parameters changed: - sync=1 means that pmem_drain() is executed for each write operation, - depends on direct option, flags are set for pmem_memcpy() call: - direct=1 - PMEM_F_MEM_NONTEMPORAL, - direct=0 - PMEM_F_MEM_TEMPORAL.
2020-08-19configure: fix syntax error with NetBSDDmitry Fomichev
The recent patch to detect for pkg-config presence has introduced some bash-specific code to configure script. This lead to syntax errors while running configure under some other shells, such as (d)ash. Avoid ${!var} indirect substitution syntax and stop using "local" keyword which is non-POSIX-standard. Address a few minor shellcheck complaints about the code in same function. Fixes: 162f8c2a96ae ("configure: check if pkg-config is installed") Reviewed-by: Sitsofe Wheeler <> Signed-off-by: Dmitry Fomichev <> Signed-off-by: Jens Axboe <>
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 <> Signed-off-by: Dmitry Fomichev <> Signed-off-by: Jens Axboe <>
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 <> Signed-off-by: Dmitry Fomichev <> Signed-off-by: Jens Axboe <>
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: Signed-off-by: Sitsofe Wheeler <>
2020-07-26configure: check for Debian/Ubuntu tcmalloc_minimalSitsofe Wheeler
Debian derived distros have a libtcmalloc-minimal4 package that only has a versioned inside, so try explicitly searching for it when looking for tcmalloc. Signed-off-by: Sitsofe Wheeler <>
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 ( ). 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 ( ). 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: Signed-off-by: Sitsofe Wheeler <>
2020-07-25configure: error early on too old compierJens Axboe
Signed-off-by: Jens Axboe <>
2020-07-21zbd: Support zone capacity smaller than zone sizeShin'ichiro Kawasaki
NVMe ZNS specification defines zone capacity. The report zone interface of Linux kernel supports it. This patch adds support for this new interface. Modify configure to check availability of BLK_ZONE_REP_CAPACITY flag as well as blkzoned.h header only when target OS is Linux. If this flag is defined and set in the report zone, all sectors from the zone capacity up to the zone size are not accessible. Prevent read and write operations to these sectors by modifying zbd_adjust_block(). Of note is that this skips the region between zone capacity and zone size then reduces total I/O bytes of sequential workloads. Introduce helper functions zbd_zone_end() and zbd_zone_capacity_end() to improve readability of zone limit check code. Reviewed-by: Damien Le Moal <> Signed-off-by: Aravind Ramesh <> Signed-off-by: Hans Holmberg <> Signed-off-by: Shin'ichiro Kawasaki <> Signed-off-by: Jens Axboe <>
2020-07-03configure: fix bad indentationJens Axboe
Signed-off-by: Jens Axboe <>
2020-07-03configure: new --dynamic-libengines build optionYigal Korman
When enabled, some of the more dependency-heavy internal engines are converted to "plugin" engines, i.e. they are built into separate object files and are loaded by fio on demand. This helps downstream distros package these engines separately and not force a long list of package dependencies from the base fio package. Signed-off-by: Yigal Korman <> Signed-off-by: Jens Axboe <>
2020-07-03configure/Makefile: engine LIBS consistencyYigal Korman
Some engines were adding their LIBS in the Makefile and some were declaring them in the configure script. This is inconsistent and confusing and prevents easy bulk changes to the engines. Signed-off-by: Yigal Korman <> Signed-off-by: Jens Axboe <>
2020-06-21configure: Use -Wimplicit-fallthrough=2 instead of -Wimplicit-fallthrough=3Bart Van Assche
This makes clang accept /* fallthrough */ as a fallthrough annotation. Signed-off-by: Bart Van Assche <>
2020-05-31engines: pvsync2 libaio io_uring: add support for RWF_NOWAITKonstantin Khlebnikov
Add bool option "nowait" into engines which could support this feature. Add test for libaio >= 0.3.111 into configure script to be compatible with prior versions where field iocb.aio_rw_flags was declared as "__pad2". By default if a request cannot be executed immediately (e.g. resource starvation, waiting on locks) it is queued and the initiating process will be blocked until the required resource becomes free. This option sets the RWF_NOWAIT flag (supported from the 4.14 Linux kernel) and the call will return instantly with EAGAIN or a partial result rather than waiting. It is useful to also use ignore_error=EAGAIN when using this option. Note: glibc 2.27, 2.28 have a bug in syscall wrappers preadv2, pwritev2. They return EOPNOTSUP instead of EAGAIN. For cached I/O, using this option usually means a request operates only with cached data. Currently the RWF_NOWAIT flag does not supported for cached write. For direct I/O, requests will only succeed if cache invalidation isn't required, file blocks are fully allocated and the disk request could be issued immediately. Signed-off-by: Konstantin Khlebnikov <> Link:
2020-04-13configure/Makefile: don't override user CFLAGSKonstantin Kharlamov
It is a usual practice to build sw by passing `CFLAGS="-foo"` on configure stage. It didn't work with FIO though. This commit fixes two problems: * configure: this script was overriding user CFLAGS * Makefile: this script was appending its own CFLAGS instead of prepending them. The problem with this one is that it sets a -O3 option, but a user may have wanted to disable optimization, so they set -O0 option. And by appending our CFLAGS we make user CFLAGS to not work. Signed-off-by: Konstantin Kharlamov <>
2020-04-07fio: Introduce libzbc IO engineDmitry Fomichev
Many storage users in the field are using Linux enterprise distributions with somewhat old kernel versions 3.x that do not have zoned block device/ZBC/ZAC support, or distributions with more recent kernel versions that do not have zoned block device support enabled by default, i.e. not supported by the distribution vendor. Despite this, there are many examples of production applications using SMR disks directly using SCSI passthrough commands. SMR disks performance tests and qualification using fio in such environments is possible using the sg IO engine but writing scripts is not easy as the zonemode=zbd cannot be used due to its lack of support for ZBC operations (report zones, zone reset, etc). Rather than modifying the sg IO engine, a simpler approach to provide passthrough SMR support in fio is to use libzbc ( to implement a ZBC compliant ioengine supporting zonemode=zbd zone operations. With this, it becomes possible to run more easily fio against SMR disks on systems without kernel zoned block device support. This approach will also naturally enable support for other ZBD disks varieties besides ZAC/ZBC SMR disks, namely the upcoming Zone Domains/Zone Realms (ZD/ZR) drives, aka, dynamic hybrid SMR drives. This new libzbc IO engine implements the three IO engine methods related to zoned devices: get_zoned_model(), report_zones() and reset_wp(), allowing the use of zonemode=zbd. Special open_file(), close_file() and get_file_size() methods are provided and implemented using libzbc functions. The queue() operation allows only synchronous read and write operations using the libzbc functions zbc_pread() and zbc_pwrite(). Signed-off-by: Dmitry Fomichev <> Signed-off-by: Damien Le Moal <> Signed-off-by: Jens Axboe <>
2020-04-07fio: Generalize zonemode=zbdDamien Le Moal
Generalize the implementation of the zbd zonemode for non-linux systems and Linux systems without the blkzoned.h header file (that is, linux systems with a kernel predating v4.10 or kernels compiled without zoned block device support). The configuration option CONFIG_HAS_BLKZONED determines if the system supports or not zoned block devices. This option can be set for Linux only for now. If it is set, the file oslib/linux-blkzoned.c is compiled and the 3 functions defined are used by the zbd.c code to determine a block device zoned model, get zone information and reset zones. For systems that do not set the CONFIG_HAS_BLKZONED option, zonemode=zbd will be useable with regular block devices with the zbd code emulating zones as is already done currently. Signed-off-by: Damien Le Moal <> Signed-off-by: Jens Axboe <>
2020-03-15configure: fix vasprintf check under muslRosen Penev
It errors when passing NULL or 0. Passing an empty va_list works.
2020-03-03engines/filestat: add statx(2) syscall supportTomohiro Kusumi
This commit 1) tests existence of statx(2) and libc support on ./confiugre. 2) adds oslib/statx.c and implements statx(2) using above result. 3) adds statx(2) support in filestat ioengine. Confirmed compilation on Fedora31, FreeBSD, and NetBSD. Signed-off-by: Tomohiro Kusumi <>
2020-01-06Windows: Fix multiple configure testsBart Van Assche
Auto-detect whether socklen_t, gettimeofday(), TCP_NODELAY and IPv6 are supported instead of hard-coding that these are supported. Signed-off-by: Bart Van Assche <>
2020-01-06configure: Improve the getopt_long_only() testBart Van Assche
Fix the following build error if configure is invoked with --extra-cflags=-Werror: /tmp/fio-conf-20209-133775-26866.c: In function 'main': /tmp/fio-conf-20209-133775-26866.c:6:11: error: null argument where non-null required (argument 3) [-Werror=nonnull] int c = getopt_long_only(argc, argv, NULL, NULL, NULL); ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Bart Van Assche <>
2020-01-06configure: Improve the ibverbs testBart Van Assche
This patch fixes the following configure test build error if configure is invoked with --extra-cflags=-Werror: /tmp/fio-conf-14710-130227-4466.c: In function 'main': /tmp/fio-conf-14710-130227-4466.c:4:18: error: unused variable 'pd' [-Werror=unused-variable] struct ibv_pd *pd = ibv_alloc_pd(NULL); ^~ cc1: all warnings being treated as errors Signed-off-by: Bart Van Assche <>