Merge branch 'fio-docs-ci' of https://github.com/vincentkfu/fio
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Feb 2022 23:29:44 +0000 (16:29 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Feb 2022 23:29:44 +0000 (16:29 -0700)
* 'fio-docs-ci' of https://github.com/vincentkfu/fio:
  windows: update the installer build for renamed files
  ci: install sphinx packages and add doc building to GitHub Actions
  HOWTO: combine two chunk_size listings into a single one
  HOWTO: combine separate hipri listings into a single one
  HOWTO: combine multiple pool option listings
  docs: rename HOWTO to HOWTO.rst
  docs: update Makefile in order to detect build failures
  docs: document cpumode option for the cpuio ioengine

Makefile
arch/arch-aarch64.h
backend.c
t/io_uring.c

index 2432f5192f8eb63295a382108f6f1be3f29cdbb2..0ab4f82c32c3db5b06b8e16fb8cd383a45fdcd9a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -295,7 +295,7 @@ define engine_template =
 $(1)_OBJS := $$($(1)_SRCS:.c=.o)
 $$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
 engines/fio-$(1).so: $$($(1)_OBJS)
-       $$(QUIET_LINK)$(CC) $(DYNAMIC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
+       $$(QUIET_LINK)$(CC) $(LDFLAGS) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
 ENGS_OBJS += engines/fio-$(1).so
 endef
 else # !CONFIG_DYNAMIC_ENGINES
index 2a86cc5ab4d9b9cb1bef2dcf5d0aab24bfc38fb8..94571709eb2756d41a921f981b669ae27ee7b1ae 100644 (file)
@@ -27,4 +27,21 @@ static inline int arch_ffz(unsigned long bitmask)
 
 #define ARCH_HAVE_FFZ
 
+static inline unsigned long long get_cpu_clock(void)
+{
+       unsigned long val;
+
+       asm volatile("mrs %0, cntvct_el0" : "=r" (val));
+       return val;
+}
+#define ARCH_HAVE_CPU_CLOCK
+
+#define ARCH_HAVE_INIT
+extern bool tsc_reliable;
+static inline int arch_init(char *envp[])
+{
+       tsc_reliable = true;
+       return 0;
+}
+
 #endif
index 061e3b329d2cd113d1f566a6e2da31c8019d37c7..c035baed607a09a320e2583abd815ab1fe2ef1e0 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1091,8 +1091,10 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)
                                td->rate_io_issue_bytes[__ddir] += blen;
                        }
 
-                       if (should_check_rate(td))
+                       if (should_check_rate(td)) {
                                td->rate_next_io_time[__ddir] = usec_for_io(td, __ddir);
+                               fio_gettime(&comp_time, NULL);
+                       }
 
                } else {
                        ret = io_u_submit(td, io_u);
@@ -1172,8 +1174,11 @@ reap:
                                                                f->file_name);
                        }
                }
-       } else
+       } else {
+               if (td->o.io_submit_mode == IO_MODE_OFFLOAD)
+                       workqueue_flush(&td->io_wq);
                cleanup_pending_aio(td);
+       }
 
        /*
         * stop job if we failed doing any IO
index faf5978c4abfdb7611fc3daa300141c4b0a83dd6..4520de436e1558d891f5f500f1b169850bb2ee60 100644 (file)
@@ -714,12 +714,15 @@ static int reap_events_aio(struct submitter *s, struct io_event *events, int evs
 static void *submitter_aio_fn(void *data)
 {
        struct submitter *s = data;
-       int i, ret, prepped, nr_batch;
+       int i, ret, prepped;
        struct iocb **iocbsptr;
        struct iocb *iocbs;
        struct io_event *events;
-
-       nr_batch = submitter_init(s);
+#ifdef ARCH_HAVE_CPU_CLOCK
+       int nr_batch = submitter_init(s);
+#else
+       submitter_init(s);
+#endif
 
        iocbsptr = calloc(depth, sizeof(struct iocb *));
        iocbs = calloc(depth, sizeof(struct iocb));