io_uring: micro optimization of __io_sq_thread() condition
authorOlivier Langlois <olivier@trillion01.com>
Tue, 30 Jul 2024 20:56:06 +0000 (16:56 -0400)
committerJens Axboe <axboe@kernel.dk>
Sun, 18 Aug 2024 20:40:21 +0000 (14:40 -0600)
commit0b3480f3ffadc55b0a3c520ce5e8d0b5ac259aa9
tree2da02f15193b26a52da0d2634dbd439a04a529ee
parent5f420152a00db89efc1a50bf2d4ba3020af3156d
io_uring: micro optimization of __io_sq_thread() condition

reverse the order of the element evaluation in an if statement.

for many users that are not using iopoll, the iopoll_list will always
evaluate to false after having made a memory access whereas to_submit is
very likely already loaded in a register.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/052ca60b5c49e7439e4b8bd33bfab4a09d36d3d6.1722374371.git.olivier@trillion01.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/sqpoll.c