]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: only wake when the correct events are set
authorDylan Yudaken <dylany@fb.com>
Thu, 12 May 2022 09:18:34 +0000 (02:18 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 May 2022 20:37:50 +0000 (14:37 -0600)
commit192d5a2219a7bac1166a6ef96e1e0723ee77ecbe
tree34d4e270df6a1d4fc2175e74d5063713cbeb568c
parentfc7a90144f39b266ed46daef3dc9c7778d02cf95
io_uring: only wake when the correct events are set

The check for waking up a request compares the poll_t bits, however this
will always contain some common flags so this always wakes up.

For files with single wait queues such as sockets this can cause the
request to be sent to the async worker unnecesarily. Further if it is
non-blocking will complete the request with EAGAIN which is not desired.

Here exclude these common events, making sure to not exclude POLLERR which
might be important.

Fixes: 4163e41e4431 ("io_uring: use poll driven retry for files that support it")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220512091834.728610-3-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c