From 4cdbc04870a211ee1ec9aef87e8f04b2405e22e8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 13 Dec 2018 14:23:39 -0700 Subject: [PATCH] engines/aioring: update to newer API Signed-off-by: Jens Axboe --- engines/aioring.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/aioring.c b/engines/aioring.c index cb13b415..46469dbf 100644 --- a/engines/aioring.c +++ b/engines/aioring.c @@ -61,6 +61,8 @@ typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; +#define IORING_SQ_NEED_WAKEUP (1 << 0) + struct aio_sq_ring { union { struct { @@ -68,6 +70,7 @@ struct aio_sq_ring { u32 tail; u32 nr_events; u16 sq_thread_cpu; + u16 kflags; u64 iocbs; }; u32 pad[16]; @@ -368,6 +371,10 @@ static int fio_aioring_commit(struct thread_data *td) /* Nothing to do */ if (o->sqthread_poll) { + struct aio_sq_ring *ring = ld->sq_ring; + + if (ring->kflags & IORING_SQ_NEED_WAKEUP) + io_ring_enter(ld->aio_ctx, ld->queued, 0, IORING_FLAG_SUBMIT); ld->queued = 0; return 0; } -- 2.25.1