diff options
author | Bart Van Assche <bvanassche@acm.org> | 2020-09-12 07:58:00 -0700 |
---|---|---|
committer | Bart Van Assche <bvanassche@acm.org> | 2020-09-25 19:43:43 -0700 |
commit | 696378af1212312425975d739acb54277616f8c9 (patch) | |
tree | 8faaee4941af77cda58903758c75ec18bf69ab72 /configure | |
parent | df9bd7d452dfdcebfc1bdf317c74c3af09cc9719 (diff) | |
download | fio-696378af1212312425975d739acb54277616f8c9.tar.gz fio-696378af1212312425975d739acb54277616f8c9.tar.bz2 |
helper_thread: Increase timer accuracy
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 <bvanassche@acm.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -2682,6 +2682,24 @@ else pdb=no fi print_config "Windows PDB generation" "$pdb" + +########################################## +# check for timerfd support +timerfd_create="no" +cat > $TMPC << EOF +#include <sys/time.h> +#include <sys/timerfd.h> + +int main(int argc, char **argv) +{ + return timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); +} +EOF +if compile_prog "" "" "timerfd_create"; then + timerfd_create="yes" +fi +print_config "timerfd_create" "$timerfd_create" + ############################################################################# if test "$wordsize" = "64" ; then @@ -2983,6 +3001,9 @@ fi if test "$statx_syscall" = "yes"; then output_sym "CONFIG_HAVE_STATX_SYSCALL" fi +if test "$timerfd_create" = "yes"; then + output_sym "CONFIG_HAVE_TIMERFD_CREATE" +fi if test "$fallthrough" = "yes"; then CFLAGS="$CFLAGS -Wimplicit-fallthrough" fi |