From 320c701ec5aee03ec65c2bd577040fcc761d8e4a Mon Sep 17 00:00:00 2001 From: Florian Fischer <florian.fischer@muhq.space> Date: Mon, 14 Mar 2022 11:46:03 +0100 Subject: [PATCH] properly track the amount of expected cqes IOURING_OP_MSG_RING will creates two cqes on probably different rings. We do not need the cqe on the submitting ring therefore skip its generation and only track that on the messaged ring an additional cqe is expected. --- emper/sleep_strategy/AbstractIoSleepStrategy.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emper/sleep_strategy/AbstractIoSleepStrategy.cpp b/emper/sleep_strategy/AbstractIoSleepStrategy.cpp index 9bcb0a36..818bb06a 100644 --- a/emper/sleep_strategy/AbstractIoSleepStrategy.cpp +++ b/emper/sleep_strategy/AbstractIoSleepStrategy.cpp @@ -111,7 +111,11 @@ void AbstractIoSleepStrategy::sendSpecificNotification(workerid_t workerId) { io_uring_prep_msg_ring(sqe, runtime.ioContexts[workerId]->ring.ring_fd, tag, 0); - io.trackReqsInUring(1); + // Do not generate a cqe on the submiting io_uring + sqe->flags = IOSQE_CQE_SKIP_SUCCESS; + + // The sent message will create a cqes one on the messaged io_uring + runtime.ioContexts[workerId]->trackReqsInUring(1); io.submitPreparedSqesAndWait<CallerEnvironment::EMPER>(0); } -- GitLab