All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Hao Xu <hao.xu@linux.dev>, io-uring@vger.kernel.org
Cc: Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH] io_uring: net: fix bug of completing multishot accept twice
Date: Fri, 17 Jun 2022 08:23:13 -0600	[thread overview]
Message-ID: <6704dc2f-87dd-62d5-7f95-871b6db3a398@kernel.dk> (raw)
In-Reply-To: <20220617141201.170314-1-hao.xu@linux.dev>

On 6/17/22 8:12 AM, Hao Xu wrote:
> From: Hao Xu <howeyxu@tencent.com>
> 
> Now that we use centralized completion in io_issue_sqe, we should skip
> that for multishot accept requests since we complete them in the
> specific op function.
> 
> Fixes: 34106529422e ("io_uring: never defer-complete multi-apoll")
> Signed-off-by: Hao Xu <howeyxu@tencent.com>
> ---
> 
> I retrieved the history:
> 
> in 4e86a2c98013 ("io_uring: implement multishot mode for accept")
> we add the multishot accept, it repeatly completes cqe in io_accept()
> until get -EAGAIN [1], then it returns 0 to io_issue_sqe().
> io_issue_sqe() does nothing to it then.
> 
> in 09eaa49e078c ("io_uring: handle completions in the core")
> we add __io_req_complete() for IOU_OK in io_issue_sqe(). This causes at
> [1], we do call __io_req_complete().But since IO_URING_F_COMPLETE_DEFER
> is set, it does nothing.
> 
> in 34106529422e ("io_uring: never defer-complete multi-apoll")
> we remove IO_URING_F_COMPLETE_DEFER, but unluckily the multishot accept
> test is broken, we didn't find the error.
> 
> So it just has infuence to for-5.20, I'll update the liburing test
> today.

Do you mind if I fold this into:

09eaa49e078c ("io_uring: handle completions in the core")

as I'm continually rebasing the 5.20 branch until 5.19 is fully sorted?

-- 
Jens Axboe


  reply	other threads:[~2022-06-17 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 14:12 [PATCH] io_uring: net: fix bug of completing multishot accept twice Hao Xu
2022-06-17 14:23 ` Jens Axboe [this message]
2022-06-17 14:34   ` Hao Xu
2022-06-17 14:34     ` 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=6704dc2f-87dd-62d5-7f95-871b6db3a398@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=hao.xu@linux.dev \
    --cc=io-uring@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.