From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH for-next 1/5] io_uring: return back links tw run optimisation
Date: Mon, 16 Jan 2023 16:48:57 +0000 [thread overview]
Message-ID: <6328acdbb5e60efc762b18003382de077e6e1367.1673887636.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
io_submit_flush_completions() may queue new requests for tw execution,
especially true for linked requests. Recheck the tw list for emptiness
after flushing completions.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/io_uring.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 718f56baecbd..5570422dc2fb 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1344,8 +1344,11 @@ static int __io_run_local_work(struct io_ring_ctx *ctx, bool *locked)
if (!llist_empty(&ctx->work_llist))
goto again;
- if (*locked)
+ if (*locked) {
io_submit_flush_completions(ctx);
+ if (!llist_empty(&ctx->work_llist))
+ goto again;
+ }
trace_io_uring_local_work_run(ctx, ret, loops);
return ret;
}
--
2.38.1
next prev parent reply other threads:[~2023-01-16 17:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 16:48 [PATCH for-next 0/5] random for-next patches Pavel Begunkov
2023-01-16 16:48 ` Pavel Begunkov [this message]
2023-01-16 18:43 ` [PATCH for-next 1/5] io_uring: return back links tw run optimisation Jens Axboe
2023-01-16 19:47 ` Pavel Begunkov
2023-01-16 21:04 ` Jens Axboe
2023-01-16 21:14 ` Pavel Begunkov
2023-01-16 21:17 ` Jens Axboe
2023-01-16 21:15 ` Pavel Begunkov
2023-01-16 21:18 ` Jens Axboe
2023-01-16 16:48 ` [PATCH for-next 2/5] io_uring: don't export io_put_task() Pavel Begunkov
2023-01-16 16:48 ` [PATCH for-next 3/5] io_uring: simplify fallback execution Pavel Begunkov
2023-01-16 16:49 ` [PATCH for-next 4/5] io_uring: optimise ctx flags layout Pavel Begunkov
2023-01-16 16:49 ` [PATCH for-next 5/5] io_uring: refactor __io_req_complete_post Pavel Begunkov
2023-01-16 21:09 ` [PATCH for-next 0/5] random for-next patches Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6328acdbb5e60efc762b18003382de077e6e1367.1673887636.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox