]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add sockets to list of files that support non-blocking issue
authorJens Axboe <axboe@kernel.dk>
Tue, 10 Dec 2019 03:16:22 +0000 (20:16 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Dec 2019 23:33:23 +0000 (16:33 -0700)
commitf98f503699901a2078b108c6db7fddd454388fca
treee9916509157949e358b6c767cd6de29e6fc9690c
parent1ec5b8981549cf13a083e78da8426dcf938bcd64
io_uring: add sockets to list of files that support non-blocking issue

In chasing a performance issue between using IORING_OP_RECVMSG and
IORING_OP_READV on sockets, tracing showed that we always punt the
socket reads to async offload. This is due to io_file_supports_async()
not checking for S_ISSOCK on the inode. Since sockets supports the
O_NONBLOCK (or MSG_DONTWAIT) flag just fine, add sockets to the list
of file types that we can do a non-blocking issue to.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c