public inbox for [email protected]
 help / color / mirror / Atom feed
From: Hao Xu <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Cc: Jens Axboe <[email protected]>
Subject: Re: [PATCH] io_uring: avoid iowq again trap
Date: Sun, 15 May 2022 15:31:47 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <f168b4f24181942f3614dd8ff648221736f572e6.1652433740.git.asml.silence@gmail.com>

On 5/13/22 18:24, Pavel Begunkov wrote:
> If an opcode handler semi-reliably returns -EAGAIN, io_wq_submit_work()

Hi Pavel,
When would it return -EAGAIN in non-IOPOLL mode?

> might continue busily hammer the same handler over and over again, which
> is not ideal. The -EAGAIN handling in question was put there only for
> IOPOLL, so restrict it to IOPOLL mode only.
> 
> Signed-off-by: Pavel Begunkov <[email protected]>
> ---
>   fs/io_uring.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index e01f595f5b7d..3af1905efc78 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -7319,6 +7319,8 @@ static void io_wq_submit_work(struct io_wq_work *work)
>   		 * wait for request slots on the block side.
>   		 */
>   		if (!needs_poll) {
> +			if (!(req->ctx->flags & IORING_SETUP_IOPOLL))
> +				break;
>   			cond_resched();
>   			continue;
>   		}


  parent reply	other threads:[~2022-05-15  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 10:24 [PATCH] io_uring: avoid iowq again trap Pavel Begunkov
2022-05-13 12:31 ` Jens Axboe
2022-05-13 12:49   ` Pavel Begunkov
2022-05-13 12:50     ` Jens Axboe
2022-05-13 12:51 ` Jens Axboe
2022-05-15  7:31 ` Hao Xu [this message]
2022-05-15 14:21   ` Pavel Begunkov
2022-05-15 15:07     ` Hao Xu

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] \
    /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