mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
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>
This commit is contained in:
parent
f18ee4cf0a
commit
5e159204d7
@ -6616,8 +6616,8 @@ static int io_submit_sqe(struct io_ring_ctx *ctx, struct io_kiocb *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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user