]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: optimise request allocation
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 Oct 2021 19:02:49 +0000 (20:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:54 +0000 (05:49 -0600)
commit5372243ecf4161764b451435b1222ced28f01455
tree15dbe6fca6f7bd0a23a6d99a12a10b6e257af760
parent0617ac711071c5bbc63fca1813ebb74673b4f3be
io_uring: optimise request allocation

Even after fully inlining io_alloc_req() my compiler does a NULL check
in the path of successful allocation, no hacks like an empty dereference
help it. Restructure io_alloc_req() by splitting out refilling part, so
the compiler generate a slightly better binary.

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