io_uring: refill request cache in memory order
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Mar 2024 01:07:22 +0000 (19:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Mar 2024 17:10:21 +0000 (11:10 -0600)
commit2d9c5f8d09338194043d4c9064066ae884f68eef
tree2480670048617cbec1b49959de57ada7b043c70b
parent724902260fabf7254d1787177c8f501d74ab08c6
io_uring: refill request cache in memory order

The allocator will generally return memory in order, but
__io_alloc_req_refill() then adds them to a stack and we'll extract them
in the opposite order. This obviously isn't a huge deal, but:

1) it makes debugging easier when they are in order
2) keeping them in-order is the right thing to do
3) reduces the code for adding them to the stack

Just add them in reverse to the stack.

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