linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 9/9] io_uring: pass submission ref to async
Date: Mon, 2 Mar 2020 18:26:01 +0300	[thread overview]
Message-ID: <19a08aaa-069b-27d1-1cb7-5033b74c2e78@gmail.com> (raw)
In-Reply-To: <902c439f-81ff-7593-e6b4-eee3f217c292@kernel.dk>

On 3/2/2020 6:12 PM, Jens Axboe wrote:
> On 3/2/20 8:08 AM, Pavel Begunkov wrote:
>> On 3/2/2020 12:39 AM, Pavel Begunkov wrote:
>>> On 01/03/2020 19:18, Pavel Begunkov wrote:
>>>> Currenlty, every async work handler accepts a submission reference,
>>>> which it should put. Also there is a reference grabbed in io_get_work()
>>>> and dropped in io_put_work(). This patch merge them together.
>>>>
>>>> - So, ownership of the submission reference passed to io-wq, and it'll
>>>> be put in io_put_work().
>>>> - io_get_put() doesn't take a ref now and so deleted.
>>>> - async handlers don't put the submission ref anymore.
>>>> - make cancellation bits of io-wq to call {get,put}_work() handlers
>>>
>>> Hmm, it makes them more like {init,fini}_work() and unbalanced/unpaired. May be
>>> no a desirable thing.
>>
>> Any objections against replacing {get,put}_work() with
>> io_finilise_work()? It will be called once and only once, and a work
>> must not go away until it happened. It will be enough for now, but not
>> sure whether you have some plans for this get/put pinning.
> 
> I have no further plans there, the get/put work only exist to ensure that
> the work item stays valid in case of cancelation lookups.

Great, it'll go into v2 as well.

-- 
Pavel Begunkov

  reply	other threads:[~2020-03-02 15:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-01 16:18 [PATCH RFC 0/9] nxt propagation + locking optimisation Pavel Begunkov
2020-03-01 16:18 ` [PATCH 1/9] io_uring: clean up io_close Pavel Begunkov
2020-03-01 16:18 ` [PATCH 2/9] io-wq: fix IO_WQ_WORK_NO_CANCEL cancellation Pavel Begunkov
2020-03-02 14:24   ` Jens Axboe
2020-03-01 16:18 ` [PATCH 3/9] io_uring: make submission ref putting consistent Pavel Begunkov
2020-03-01 16:18 ` [PATCH 4/9] io_uring: remove @nxt from handlers Pavel Begunkov
2020-03-01 16:18 ` [PATCH 5/9] io_uring: get next req on subm ref drop Pavel Begunkov
2020-03-01 21:31   ` Pavel Begunkov
2020-03-01 16:18 ` [PATCH 6/9] io-wq: shuffle io_worker_handle_work() code Pavel Begunkov
2020-03-01 16:18 ` [PATCH 7/9] io-wq: io_worker_handle_work() optimise locking Pavel Begunkov
2020-03-01 16:18 ` [PATCH 8/9] io-wq: optimise double lock for io_get_next_work() Pavel Begunkov
2020-03-01 16:18 ` [PATCH 9/9] io_uring: pass submission ref to async Pavel Begunkov
2020-03-01 21:39   ` Pavel Begunkov
2020-03-02 15:08     ` Pavel Begunkov
2020-03-02 15:12       ` Jens Axboe
2020-03-02 15:26         ` Pavel Begunkov [this message]
2020-03-01 16:23 ` [PATCH RFC 0/9] nxt propagation + locking optimisation Pavel Begunkov
2020-03-01 16:41   ` Pavel Begunkov
2020-03-01 19:14 ` Jens Axboe
2020-03-01 20:33   ` Pavel Begunkov
2020-03-02 14:39     ` 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=19a08aaa-069b-27d1-1cb7-5033b74c2e78@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --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).