linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/4] forbid fix {SQ,IO}POLL
Date: Thu, 4 Jun 2020 13:52:10 -0600	[thread overview]
Message-ID: <cc3197f9-e8b1-ac13-c121-291bb32646e3@kernel.dk> (raw)
In-Reply-To: <d1d92d99-c6b1-fc6e-ea1d-6c2e5097d83f@gmail.com>

On 6/4/20 1:22 PM, Pavel Begunkov wrote:
> On 04/06/2020 20:06, Jens Axboe wrote:
>> On 6/3/20 12:51 PM, Jens Axboe wrote:
>>> On 6/3/20 9:03 AM, Pavel Begunkov wrote:
>>>> The first one adds checks {SQPOLL,IOPOLL}. IOPOLL check can be
>>>> moved in the common path later, or rethinked entirely, e.g.
>>>> not io_iopoll_req_issued()'ed for unsupported opcodes.
>>>>
>>>> 3 others are just cleanups on top.
>>>>
>>>>
>>>> v2: add IOPOLL to the whole bunch of opcodes in [1/4].
>>>>     dirty and effective.
>>>> v3: sent wrong set in v2, re-sending right one 
>>>>
>>>> Pavel Begunkov (4):
>>>>   io_uring: fix {SQ,IO}POLL with unsupported opcodes
>>>>   io_uring: do build_open_how() only once
>>>>   io_uring: deduplicate io_openat{,2}_prep()
>>>>   io_uring: move send/recv IOPOLL check into prep
>>>>
>>>>  fs/io_uring.c | 94 ++++++++++++++++++++++++++-------------------------
>>>>  1 file changed, 48 insertions(+), 46 deletions(-)
>>>
>>> Thanks, applied.
>>
>> #1 goes too far, provide/remove buffers is fine with iopoll. I'll
>> going to edit the patch.
> 
> Conceptually it should work, but from a quick look:
> 
> - io_provide_buffers() drops a ref from req->refs, which should've
> been used by iopoll*. E.g. io_complete_rw_iopoll() doesn't do that.
> 
> - it doesn't set REQ_F_IOPOLL_COMPLETED, thus iopoll* side will
> call req->file->iopoll().

We don't poll for provide/remove buffers, or file update. The
completion is done inline. The REQ_F_IOPOLL_COMPLETED and friends
is only applicable on read/writes.

-- 
Jens Axboe


  reply	other threads:[~2020-06-04 19:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 15:03 [PATCH v3 0/4] forbid fix {SQ,IO}POLL Pavel Begunkov
2020-06-03 15:03 ` [PATCH v3 1/4] io_uring: fix {SQ,IO}POLL with unsupported opcodes Pavel Begunkov
2020-06-03 15:03 ` [PATCH v3 2/4] io_uring: do build_open_how() only once Pavel Begunkov
2020-06-03 15:03 ` [PATCH v3 3/4] io_uring: deduplicate io_openat{,2}_prep() Pavel Begunkov
2020-06-03 15:03 ` [PATCH v3 4/4] io_uring: move send/recv IOPOLL check into prep Pavel Begunkov
2020-06-03 15:14 ` [PATCH v3 0/4] forbid fix {SQ,IO}POLL Pavel Begunkov
2020-06-03 18:51 ` Jens Axboe
2020-06-04 17:06   ` Jens Axboe
2020-06-04 19:22     ` Pavel Begunkov
2020-06-04 19:52       ` Jens Axboe [this message]
2020-06-04 20:12         ` Pavel Begunkov
2020-06-04 20:17           ` Jens Axboe
2020-06-04 20:25             ` Pavel Begunkov

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=cc3197f9-e8b1-ac13-c121-291bb32646e3@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).