]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring: add io_file_can_poll() helper
authorJens Axboe <axboe@kernel.dk>
Mon, 29 Jan 2024 03:08:24 +0000 (20:08 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Feb 2024 20:27:06 +0000 (13:27 -0700)
commit95041b93e90a06bb613ec4bef9cd4d61570f68e4
treea40378fc60c611affd5f48bfe2efa56c9c00e157
parent521223d7c229f83915619f888c99e952f24dc39f
io_uring: add io_file_can_poll() helper

This adds a flag to avoid dipping dereferencing file and then f_op to
figure out if the file has a poll handler defined or not. We generally
call this at least twice for networked workloads, and if using ring
provided buffers, we do it on every buffer selection. Particularly the
latter is troublesome, as it's otherwise a very fast operation.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/kbuf.c
io_uring/poll.c
io_uring/rw.c