Skip to content

Commit

Permalink
resume libaio requesters maximal gets libaio_ctx->iodepth events
Browse files Browse the repository at this point in the history
Signed-off-by: Coldwings <coldwings@me.com>
  • Loading branch information
Coldwings committed Jan 18, 2024
1 parent a3c638e commit fa0e119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io/aio-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; i<n; ++i)
{
auto piocb = (libaiocb*)events[i].obj;
Expand All @@ -166,7 +166,7 @@ namespace photon
VALUE(piocb->u.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;
Expand Down

0 comments on commit fa0e119

Please sign in to comment.