io_uring: inline fixed part of io_file_get()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 9 Aug 2021 12:04:02 +0000 (13:04 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Aug 2021 19:52:05 +0000 (13:52 -0600)
commit7c66de0bf6711416be6b70db853bfa315d963813
tree3ca7ada9d20cf77763c9a43325ab2634eeadde80
parent27cc8c0c1ab7f4e1a581fc6b78f873a9032a55e3
io_uring: inline fixed part of io_file_get()

Optimise io_file_get() with registered files, which is in a hot path,
by inlining parts of the function. Saves a function call, and
inefficiencies of passing arguments, e.g. evaluating
(sqe_flags & IOSQE_FIXED_FILE).

It couldn't have been done before as compilers were refusing to inline
it because of the function size.

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