Recent changes (master)
The following changes since commit 8025517dfa599be4bc795e4af7c9012d10b81bc5:
t/io_uring: add IORING_OP_NOP support (2019-01-12 22:14:54 -0700)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to c21198d9cd52b6239c8f9de2373574a7683a0593:
t/io_uring: use the right check for when to wait (2019-01-13 22:52:07 -0700)
----------------------------------------------------------------
Jens Axboe (7):
Move io_uring to os/linux/
io_uring: ensure that the io_uring_register() structs are 32-bit safe
io_uring: fix pointer cast warning on 32-bit
t/io_uring: add option for register_files
io_uring: add 32-bit x86 support
t/io_uring: only call setrlimit() for fixedbufs t/io_uring: use the right check for when to wait
Makefile | 2 +-
arch/arch-x86.h | 11 +++++++++++
engines/io_uring.c | 4 ++--
os/{ => linux}/io_uring.h | 17 ++++++++++++-----
t/io_uring.c | 41 ++++++++++++++++++++++++++---------------
5 files changed, 52 insertions(+), 23 deletions(-)
rename os/{ => linux}/io_uring.h (94%)---
Diff of recent changes:
Makefile +1 -1
@@ -444,7 +444,7 @@ cairo_text_helpers.o: cairo_text_helpers.c cairo_text_helpers.h printing.o: printing.c printing.h $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $< -t/io_uring.o: os/io_uring.h +t/io_uring.o: os/linux/io_uring.h t/io_uring: $(T_IOU_RING_OBJS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_IOU_RING_OBJS) $(LIBS)
arch/arch-x86.h +11 -0
@@ -1,6 +1,16 @@#ifndef ARCH_X86_H #define ARCH_X86_H +#ifndef __NR_sys_io_uring_setup +#define __NR_sys_io_uring_setup 387 +#endif +#ifndef __NR_sys_io_uring_enter +#define __NR_sys_io_uring_enter 388 +#endif +#ifndef __NR_sys_io_uring_register +#define __NR_sys_io_uring_register 389 +#endif +static inline void do_cpuid (unsigned int *eax,unsigned int *ebx,unsigned int *ecx,unsigned int *edx) {
@@ -36,5 +46,6 @@ static inline unsigned long long get_cpu_clock(void)#define ARCH_HAVE_FFZ #define ARCH_HAVE_CPU_CLOCK +#define ARCH_HAVE_IOURING #endif
engines/io_uring.c +2 -2
@@ -21,7 +21,7 @@ #ifdef ARCH_HAVE_IOURING #include "../lib/types.h" -#include "../os/io_uring.h" +#include "../os/linux/io_uring.h" struct io_sq_ring { unsigned *head;
@@ -187,7 +187,7 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event) index = (event + ld->cq_ring_off) & ld->cq_ring_mask; cqe = &ld->cq_ring.cqes[index]; - io_u = (struct io_u *) cqe->user_data; + io_u = (struct io_u *) (uintptr_t ) cqe->user_data;if (cqe->res != io_u->xfer_buflen) {if (cqe->res > io_u->xfer_buflen)
os/linux/io_uring.h renamed from os/io_uring.h +12 -5
@@ -29,10 +29,11 @@ struct io_uring_sqe {__kernel_rwf_t rw_flags;__u32 fsync_flags; }; -__u16 buf_index;/* index into fixed buffers, if used */ -__u16 __pad2; -__u32 __pad3;__u64 user_data;/* data to be passed back at completion time */ +union { +__u16 buf_index;/* index into fixed buffers, if used */ +__u64 __pad2[3 ]; + }; };/*
@@ -136,12 +137,18 @@ struct io_uring_params {#define IORING_UNREGISTER_FILES 3struct io_uring_register_buffers { -struct iovec *iovecs; +union { +struct iovec *iovecs; +__u64 pad; + };__u32 nr_iovecs; };struct io_uring_register_files { -__s32 *fds; +union { +__s32 *fds; +__u64 pad; + };__u32 nr_fds; };
t/io_uring.c +26 -15
95 lines not on this page · raw message