Re: [PATCH V2 1/1] Docs: ublk: add ublk document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Regards,
Zhang.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux