linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Kanchan Joshi <joshi.k@samsung.com>,
	axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me
Cc: selvakuma.s1@samsung.com, linux-kernel@vger.kernel.org,
	linux-nvme@lists.infradead.org, io-uring@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, javier.gonz@samsung.com,
	nj.shetty@samsung.com
Subject: Re: [RFC PATCH 0/4] Asynchronous passthrough ioctl
Date: Wed, 27 Jan 2021 15:53:19 +0000	[thread overview]
Message-ID: <a287bd9e-3474-83a4-e5c2-98df17214dc7@gmail.com> (raw)
In-Reply-To: <489691ce-3b1e-30ce-9f72-d32389e33901@gmail.com>

On 27/01/2021 15:42, Pavel Begunkov wrote:
> On 27/01/2021 15:00, Kanchan Joshi wrote:
>> This RFC patchset adds asynchronous ioctl capability for NVMe devices.
>> Purpose of RFC is to get the feedback and optimize the path.
>>
>> At the uppermost io-uring layer, a new opcode IORING_OP_IOCTL_PT is
>> presented to user-space applications. Like regular-ioctl, it takes
>> ioctl opcode and an optional argument (ioctl-specific input/output
>> parameter). Unlike regular-ioctl, it is made to skip the block-layer
>> and reach directly to the underlying driver (nvme in the case of this
>> patchset). This path between io-uring and nvme is via a newly
>> introduced block-device operation "async_ioctl". This operation
>> expects io-uring to supply a callback function which can be used to
>> report completion at later stage.
>>
>> For a regular ioctl, NVMe driver submits the command to the device and
>> the submitter (task) is made to wait until completion arrives. For
>> async-ioctl, completion is decoupled from submission. Submitter goes
>> back to its business without waiting for nvme-completion. When
>> nvme-completion arrives, it informs io-uring via the registered
>> completion-handler. But some ioctls may require updating certain
>> ioctl-specific fields which can be accessed only in context of the
>> submitter task. For that reason, NVMe driver uses task-work infra for
>> that ioctl-specific update. Since task-work is not exported, it cannot
>> be referenced when nvme is compiled as a module. Therefore, one of the
>> patch exports task-work API.
>>
>> Here goes example of usage (pseudo-code).
>> Actual nvme-cli source, modified to issue all ioctls via this opcode
>> is present at-
>> https://github.com/joshkan/nvme-cli/commit/a008a733f24ab5593e7874cfbc69ee04e88068c5
> 
> see https://git.kernel.dk/cgit/linux-block/log/?h=io_uring-fops
> 
> Looks like good time to bring that branch/discussion back

a bit more context:
https://github.com/axboe/liburing/issues/270

-- 
Pavel Begunkov

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-01-27 15:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210127150134epcas5p251fc1de3ff3581dd4c68b3fbe0b9dd91@epcas5p2.samsung.com>
2021-01-27 15:00 ` [RFC PATCH 0/4] Asynchronous passthrough ioctl Kanchan Joshi
     [not found]   ` <CGME20210127150140epcas5p32832cc0c0db953db199eb9dd326f2d4c@epcas5p3.samsung.com>
2021-01-27 15:00     ` [RFC PATCH 1/4] block: introduce async ioctl operation Kanchan Joshi
     [not found]   ` <CGME20210127150144epcas5p29ccb35d7e7170aba7947b5ee16fd2db0@epcas5p2.samsung.com>
2021-01-27 15:00     ` [RFC PATCH 2/4] kernel: export task_work_add Kanchan Joshi
     [not found]   ` <CGME20210127150149epcas5p4fa8edd47712f28ccdd9bac5139fc6e61@epcas5p4.samsung.com>
2021-01-27 15:00     ` [RFC PATCH 3/4] nvme: add async ioctl support Kanchan Joshi
     [not found]   ` <CGME20210127150156epcas5p26cdf368e4ff6bffb132fa1c7f9430653@epcas5p2.samsung.com>
2021-01-27 15:00     ` [RFC PATCH 4/4] io_uring: add async passthrough " Kanchan Joshi
2021-01-27 15:42   ` [RFC PATCH 0/4] Asynchronous passthrough ioctl Pavel Begunkov
2021-01-27 15:53     ` Pavel Begunkov [this message]
2021-01-28 12:04       ` Kanchan Joshi
2021-01-28 14:38         ` Jens Axboe
2021-01-28 17:13           ` Kanchan Joshi
2021-01-28 17:24             ` Jens Axboe
2021-02-22 13:42               ` Kanchan Joshi
2021-02-22 14:33                 ` Jens Axboe
2021-02-23  4:41                   ` Kanchan Joshi
2021-01-28 14:50         ` Jens Axboe
2021-01-28 17:25           ` Kanchan Joshi

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=a287bd9e-3474-83a4-e5c2-98df17214dc7@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --cc=javier.gonz@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nj.shetty@samsung.com \
    --cc=sagi@grimberg.me \
    --cc=selvakuma.s1@samsung.com \
    /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).