]> git.itanic.dy.fi Git - linux-stable/commit
io_uring/rsrc: improve code generation for fixed file assignment
authorJens Axboe <axboe@kernel.dk>
Thu, 11 Jan 2024 20:34:33 +0000 (13:34 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Jan 2024 20:37:31 +0000 (13:37 -0700)
commit3f302388d45855c0b24802e7b414e3fb29f172e3
tree073876c607431fdab4f0ff5f267c821bf96a0fcc
parentfe80eb15dea5125ea64845c9de0dd7f8478dd267
io_uring/rsrc: improve code generation for fixed file assignment

For the normal read/write path, we have already locked the ring
submission side when assigning the file. This causes branch
mispredictions when we then check and try and lock again in
io_req_set_rsrc_node(). As this is a very hot path, this matters.

Add a basic helper that already assumes we already have it locked,
and use that in io_file_get_fixed().

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