Linux block layer
 help / color / mirror / Atom feed
From: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Bagas Sanjaya <bagasdotme@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	"Richard W . M . Jones" <rjones@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Subject: Re: [PATCH V2 1/1] Docs: ublk: add ublk document
Date: Thu, 1 Sep 2022 11:16:40 +0800	[thread overview]
Message-ID: <111bfafe-4d8a-8aec-8d33-958c03bd12c0@linux.alibaba.com> (raw)
In-Reply-To: <YxAjJJLoU7LR4ahh@T590>

On 2022/9/1 11:12, Ming Lei wrote:
> On Thu, Sep 01, 2022 at 11:04:24AM +0800, Ziyang Zhang wrote:
>> On 2022/9/1 10:30, Ming Lei wrote:
>>> +
>>> +- ``UBLK_IO_NEED_GET_DATA``
>>> +
>>> +  ublk server pre-allocates IO buffer for each IO by default. Any new projects
>>> +  should use this buffer to communicate with ublk driver. However, existing
>>> +  projects may break or not able to consume the new buffer interface; that's
>>> +  why this command is added for backwards compatibility so that existing
>>> +  projects can still consume existing buffers.
>>
>> Hi, Ming.
>>
>> Could you please add more information on UBLK_IO_NEED_GET_DATA. stefanha
>> found it hard to understand.
>>
>> Myabe we should write like this:
>>
>> With UBLK_F_NEED_GET_DATA enabled, the WRITE request will be firstly issued to
>> ublksrv without data copy. Then, IO backend receives the request and it can allocate
>> data buffer and embed its addr inside a new ioucmd. After the kernel driver gets the
>> ioucmd, the data copy happens(from biovecs to backend's buffer). Finally,
>> the backend receives the request again with data to be written and it can truly
>> handle the request.
>>
>> UBLK_IO_NEED_GET_DATA add one additional round-trip in ublk_drv and one
>> io_uring_enter() syscall. Any user thinks that it may lower performance
>> should not enable UBLK_F_NEED_GET_DATA. ublk server pre-allocates IO buffer
>> for each IO by default. Any new projects should use this buffer to communicate
>> with ublk driver. However, existing projects may break or not able to consume
>> the new buffer interface; that's why this command is added for backwards
>> compatibility so that existing projects can still consume existing buffers.
> 
> I am fine to add it if V3 is needed. If not, please send a new patch.
> 
> BTW, I guess Jens may consider it for v6.0.

Please add it to V3, Ming.

Thanks,
Zhang

  reply	other threads:[~2022-09-01  3:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  2:30 [PATCH V2 1/1] Docs: ublk: add ublk document Ming Lei
2022-09-01  3:04 ` Ziyang Zhang
2022-09-01  3:12   ` Ming Lei
2022-09-01  3:16     ` Ziyang Zhang [this message]
2022-09-01 12:08 ` Bagas Sanjaya
2022-09-01 12:10 ` Bagas Sanjaya
2022-09-01 12:19 ` Richard W.M. Jones
2022-09-01 13:21 ` Stefan Hajnoczi

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=111bfafe-4d8a-8aec-8d33-958c03bd12c0@linux.alibaba.com \
    --to=ziyangzhang@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=rjones@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=xiaoguang.wang@linux.alibaba.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