diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-06-14 23:37:26 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-15 15:38:40 -0600 |
commit | 5e159204d7edd5bd329e8cdb419dbd81d25751e0 (patch) | |
tree | e247df6ec86a84c9144e128fc50cda1c089ae6cc /fs/io_uring.c | |
parent | f18ee4cf0a277a0e3d043755046d5817d4ddd618 (diff) |
io_uring: small io_submit_sqe() optimisation
submit_state.link is used only to assemble a link and not used for
actual submission, so clear it before io_queue_sqe() in io_submit_sqe(),
awhile it's hot and in caches and queueing doesn't spoil it. May also
potentially help compiler with spilling or to do other optimisations.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1579939426f3ad6b55af3005b1389bbbed7d780d.1623709150.git.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 b27734bc5ca3..64fdeee01906 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6616,8 +6616,8 @@ fail_req: /* last request of a link, enqueue the link */ if (!(req->flags & (REQ_F_LINK | REQ_F_HARDLINK))) { - io_queue_sqe(head); link->head = NULL; + io_queue_sqe(head); } } else { if (unlikely(ctx->drain_next)) { |