With IORING_POLL_ADD_MULTI, we do not need to re-add the waker to the ring.
Commit 0c4fc4e3ba8e also used IORING_OP_POLL_ADD for ioeventfds, which was problematic because POLL_ADD does not clear the internal counter of an eventfd when it creates a cqe. So once an ioeventfd is re-added to the ring, it immediately generates a new cqe, despite that there is no new MMIO yet. This causes the event loop thread to spin.
With
IORING_POLL_ADD_MULTI
, we do not need to re-add the waker to the ring.Commit 0c4fc4e3ba8e also used IORING_OP_POLL_ADD for ioeventfds, which was problematic because POLL_ADD does not clear the internal counter of an eventfd when it creates a cqe. So once an ioeventfd is re-added to the ring, it immediately generates a new cqe, despite that there is no new MMIO yet. This causes the event loop thread to spin.