]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fold evfd signalling under a slower path
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 17 Mar 2022 02:03:42 +0000 (02:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Mar 2022 02:26:32 +0000 (20:26 -0600)
commitfb7dd0166a043514f821b47f6e3d0b702b7540fc
tree4c3b1da830f66232ee6158524794be2090be531a
parentc39acd5a2dec3947dc247af57349a641584a37de
io_uring: fold evfd signalling under a slower path

Add ->has_evfd flag, which is true IFF there is an eventfd attached, and
use it to hide io_eventfd_signal() into __io_commit_cqring_flush() and
combine fast checks in a single if. Also, gcc 11.2 wasn't inlining
io_cqring_ev_posted() without this change, so helps with that as well.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f6168471997decded475a063f92915787975a30b.1647481208.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c