diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-03-19 17:22:32 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-11 17:41:58 -0600 |
commit | 966706579a7124fa6334f10c48474193fd6780c0 (patch) | |
tree | 0c9cadfb50f8fb87b89a5b289a7101f7e00e9995 /fs/io_uring.c | |
parent | cf27f3b14961845d816c49abc99aae4863207c77 (diff) | |
download | lwn-966706579a7124fa6334f10c48474193fd6780c0.tar.gz lwn-966706579a7124fa6334f10c48474193fd6780c0.zip |
io_uring: keep io_req_free_batch() call locality
Don't do a function call (io_dismantle_req()) in the middle and place it
to near other function calls, otherwise may lead to excessive register
spilling.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 1c846d5f39d8..7bbecf45d91c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2112,6 +2112,7 @@ static void io_req_free_batch(struct req_batch *rb, struct io_kiocb *req, struct io_submit_state *state) { io_queue_next(req); + io_dismantle_req(req); if (req->task != rb->task) { if (rb->task) @@ -2122,7 +2123,6 @@ static void io_req_free_batch(struct req_batch *rb, struct io_kiocb *req, rb->task_refs++; rb->ctx_refs++; - io_dismantle_req(req); if (state->free_reqs != ARRAY_SIZE(state->reqs)) state->reqs[state->free_reqs++] = req; else |