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)
commita33ae9ce16a8ca62c5dffbe8909d185c6c5b4d77
tree15dbe6fca6f7bd0a23a6d99a12a10b6e257af760
parentfff4e40e3094972b119e38c8f0de4e1ca9fec654
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