From fa0e11927d730357dce0ef695d88a788b4b49735 Mon Sep 17 00:00:00 2001 From: Coldwings Date: Thu, 18 Jan 2024 15:35:45 +0800 Subject: [PATCH] resume libaio requesters maximal gets `libaio_ctx->iodepth` events Signed-off-by: Coldwings --- io/aio-wrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/aio-wrapper.cpp b/io/aio-wrapper.cpp index bd638921..fd800eed 100644 --- a/io/aio-wrapper.cpp +++ b/io/aio-wrapper.cpp @@ -153,7 +153,7 @@ namespace photon { retry: struct io_event events[IODEPTH_MAX]; - int n = HAVE_N_TRY(my_io_getevents, (0, IODEPTH_MAX, events)); + int n = HAVE_N_TRY(my_io_getevents, (0, libaio_ctx->iodepth, events)); for (int i=0; iu.c.buf), VALUE(piocb->u.c.resfd)); thread_interrupt((thread *)events[i].data, EOK); } - if (n == IODEPTH_MAX) + if (n == libaio_ctx->iodepth) { thread_yield(); goto retry;