• Jens Axboe's avatar
    io_uring: be smarter about waking multiple CQ ring waiters · 5fd46178
    Jens Axboe authored
    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>
    5fd46178
io_uring.c 253 KB