Skip to content
Commit 5fd46178 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: be smarter about waking multiple CQ ring waiters



Currently we only wake the first waiter, even if we have enough entries
posted to satisfy multiple waiters. Improve that situation so that
every waiter knows how much the CQ tail has to advance before they can
be safely woken up.

With this change, if we have N waiters each asking for 1 event and we get
4 completions, then we wake up 4 waiters. If we have N waiters asking
for 2 completions and we get 4 completions, then we wake up the first
two. Previously, only the first waiter would've been woken up.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d3e9f732
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment