• Jens Axboe's avatar
    io_uring/poll: don't enable lazy wake for POLLEXCLUSIVE · 595e5228
    Jens Axboe authored
    There are a few quirks around using lazy wake for poll unconditionally,
    and one of them is related the EPOLLEXCLUSIVE. Those may trigger
    exclusive wakeups, which wake a limited number of entries in the wait
    queue. If that wake number is less than the number of entries someone is
    waiting for (and that someone is also using DEFER_TASKRUN), then we can
    get stuck waiting for more entries while we should be processing the ones
    we already got.
    
    If we're doing exclusive poll waits, flag the request as not being
    compatible with lazy wakeups.
    Reported-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Fixes: 6ce4a93d ("io_uring/poll: use IOU_F_TWQ_LAZY_WAKE for wakeups")
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    595e5228
poll.c 28.5 KB