From: Jens Axboe Date: Fri, 11 Feb 2022 23:29:44 +0000 (-0700) Subject: Merge branch 'fio-docs-ci' of https://github.com/vincentkfu/fio X-Git-Tag: fio-3.30~48 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a1db4528a59a99c5e2aa66091c505fb60e3a70ca;hp=c1e190b527f9b89effb011c5890033d6bb2dc105 Merge branch 'fio-docs-ci' of https://github.com/vincentkfu/fio * '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 --- diff --git a/Makefile b/Makefile index 2432f519..0ab4f82c 100644 --- 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 diff --git a/arch/arch-aarch64.h b/arch/arch-aarch64.h index 2a86cc5a..94571709 100644 --- a/arch/arch-aarch64.h +++ b/arch/arch-aarch64.h @@ -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 diff --git a/backend.c b/backend.c index 061e3b32..c035baed 100644 --- 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 diff --git a/t/io_uring.c b/t/io_uring.c index faf5978c..4520de43 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -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));