io_uring: remove io_preinit_req()
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 6 May 2025 12:31:07 +0000 (13:31 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 May 2025 16:11:23 +0000 (10:11 -0600)
commit9c2ff3f9b5e0202d1cc1f6193b1e96df203ae4a4
tree98f1ba0d1b48f1de322b52dd414b79f50ff72429
parent78967aabf6138bd43798c966a75167579ce42955
io_uring: remove io_preinit_req()

Apart from setting ->ctx, io_preinit_req() zeroes a bunch of fields of a
request, from which only ->file_node is mandatory. Remove the function
and zero the entire request on first allocation. With that, we also need
to initialise ->ctx every time, which might be a good thing for
performance as now we're likely overwriting the entire cache line, and
so it can write combined and avoid RMW.

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