]> 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)
commitd46e8c5dd02f0f16f2c2b47d7837340748e0375a
tree4c3b1da830f66232ee6158524794be2090be531a
parent91b263e17948f24f7966382d210ccf73c57ecc07
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