Enable crc32c accelleration for arm64 on OSX Before: jensaxboe@Jenss-MacBook-Pro fio % ./fio --crctest=crc32c crc32c: 440.18 MiB/sec After: ensaxboe@Jenss-MacBook-Pro fio % ./fio --crctest=crc32c crc32c: 23923.00 MiB/sec We know we have it on osx on arm hardware, enabling it is pretty straightforward with that assumption. Signed-off-by: Jens Axboe <axboe@kernel.dk>
gettime: Fix compilation on non-Linux with pthread_getaffinity_np() 874d55e50c("os/os-linux: add pthread CPU affinity helper") and a few commits after that broke compilation on non-Linux platforms which support pthread_getaffinity_np(). Define fio_get_thread_affinity() on non-Linux platforms, and make gettime test FIO_HAVE_GET_THREAD_AFFINITY which may or may not depend on pthread. FIO_HAVE_GET_THREAD_AFFINITY is currently not defined on Windows. Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
configure: stop enabling fdatasync on OSX Change configure compile probes to fail on implicit declarations. This (correctly) stops us from enabling fdatasync on OSX which was problematic because we were actually calling a syscall stub with arguments different to what was declared in its prototype (see https://github.com/gbrault/picoc/issues/145#issuecomment-89734655 and https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/7 ). Fixes: https://github.com/axboe/fio/issues/834 ("Drop macOS support for fdatasync") Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
change fio_set_odirect() prototype not to use int fd This function should take struct fio_file*, since the idea of integer fd in unix likes isn't necessarily usable on other platforms (Windows). In fact, other fd related functions under os/ don't take int fd for portability even if some of them work fine with int fd at the moment. (OS headers basically (should)have no dependencies on fio functions and structures, but struct fio_file is the only exception.) Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup: add native fallocate - Implement a native fallocate mode that only logs an error (if it's implemented) and falls back to the same behaviour as fallocate=none if it fails - Add a native OSX and Linux fallocate - Update man page and HOWTO with new native and defaults v4: - Update commit message - Update man page and HOWTO Fixes https://github.com/axboe/fio/issues/22 - we now print a message if fallocate fails which gives the user a hint that behaviour might differ from other case along with a workaround suggestion (fallocate=none). Fixes https://github.com/axboe/fio/issues/376 - we now have fallocate=none fallback behaviour if native fallocate fails. On at least glibc platforms, posix_fallocate emulates fallocate if the platform/filesystem doesn't support it (see https://www.gnu.org/software/libc/manual/html_node/Storage-Allocation.html#index-posix_005ffallocate for some of the caveats) resulting in strange layout performance thus making it less attractive than fallocate=none behaviour for fio. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Use ENOTSUP if OS doesn't support blkdev page cache invalidation The return value of blockdev_invalidate_cache() has been platform dependent (some pretend success, others return EINVAL) while Linux is the only one actually supports this via Linux specific ioctl. This commit makes all the rest return a consistent value ENOTSUP, so __file_invalidate_cache() prints a blkdev invalidation failure message that is consistent and makes sense. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Move Windows port to MinGW - Add calls to WSAStartup in the network code as required by Winsock. - Add Windows-specific init_random_state function which uses the Crypto API. - Move Windows port to MinGW and update build system to create a 64-bit binary by default. - Install text files as .rtf so they won't open in Notepad by default (Wordpad understands Unix line endings; Notepad doesn't). - Simplify WiX installer code. Signed-off-by: Jens Axboe <axboe@kernel.dk>