From: Jens Axboe <[email protected]>
To: Dylan Yudaken <[email protected]>, Pavel Begunkov <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH for-next 1/4] io_uring: if a linked request has REQ_F_FORCE_ASYNC then run it async
Date: Sun, 29 Jan 2023 15:57:46 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 1/27/23 6:52?AM, Dylan Yudaken wrote:
> REQ_F_FORCE_ASYNC was being ignored for re-queueing linked
> requests. Instead obey that flag.
>
> Signed-off-by: Dylan Yudaken <[email protected]>
> ---
> io_uring/io_uring.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
> index db623b3185c8..980ba4fda101 100644
> --- a/io_uring/io_uring.c
> +++ b/io_uring/io_uring.c
> @@ -1365,10 +1365,12 @@ void io_req_task_submit(struct io_kiocb *req, bool *locked)
> {
> io_tw_lock(req->ctx, locked);
> /* req->task == current here, checking PF_EXITING is safe */
> - if (likely(!(req->task->flags & PF_EXITING)))
> - io_queue_sqe(req);
> - else
> + if (unlikely(req->task->flags & PF_EXITING))
> io_req_defer_failed(req, -EFAULT);
> + else if (req->flags & REQ_F_FORCE_ASYNC)
> + io_queue_iowq(req, locked);
> + else
> + io_queue_sqe(req);
> }
>
> void io_req_task_queue_fail(struct io_kiocb *req, int ret)
This one causes a failure for me with test/multicqes_drain.t, which
doesn't quite make sense to me (just yet), but it is a reliable timeout.
--
Jens Axboe
next prev parent reply other threads:[~2023-01-29 22:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 13:52 [PATCH for-next 0/4] io_uring: force async only ops to go async Dylan Yudaken
2023-01-27 13:52 ` [PATCH for-next 1/4] io_uring: if a linked request has REQ_F_FORCE_ASYNC then run it async Dylan Yudaken
2023-01-29 22:57 ` Jens Axboe [this message]
2023-01-29 23:17 ` Jens Axboe
2023-01-30 10:45 ` Dylan Yudaken
2023-01-30 15:53 ` Jens Axboe
2023-01-30 16:21 ` Pavel Begunkov
2023-01-27 13:52 ` [PATCH for-next 2/4] io_uring: for requests that require async, force it Dylan Yudaken
2023-01-27 13:52 ` [PATCH for-next 3/4] io_uring: always go async for unsupported fadvise flags Dylan Yudaken
2023-01-27 13:52 ` [PATCH for-next 4/4] io_uring: always go async for unsupported open flags Dylan Yudaken
2023-01-29 22:20 ` [PATCH for-next 0/4] io_uring: force async only ops to go async 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 \
[email protected] \
[email protected] \
[email protected] \
[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