]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add POLL_FIRST support for send/sendmsg and recv/recvmsg
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 18:11:33 +0000 (12:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 5 May 2022 23:09:31 +0000 (17:09 -0600)
commitba66ea9ff30109cc22ee154caaed673fcbf1c7fe
treedd14449acab4a4236eca3acb438f5c5e01db7c08
parent8c7fd231d8b7b76e097b3f1a174edc096a4c24ab
io_uring: add POLL_FIRST support for send/sendmsg and recv/recvmsg

If IORING_RECVSEND_POLL_FIRST is set for recv/recvmsg or send/sendmsg,
then we arm poll first rather than attempt a receive or send upfront.
This can be useful if we expect there to be no data (or space) available
for the request, as we can then avoid wasting time on the initial
issue attempt.

Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h