From: Jens Axboe Date: Thu, 13 Dec 2018 21:23:39 +0000 (-0700) Subject: engines/aioring: update to newer API X-Git-Tag: fio-3.13~73 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4cdbc04870a211ee1ec9aef87e8f04b2405e22e8;p=fio.git engines/aioring: update to newer API Signed-off-by: Jens Axboe --- 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; }