On Thu, Jul 28, 2022 at 08:39:16PM +0800, ZiyangZhang wrote: > UBLK_IO_NEED_GET_DATA is one ublk IO command. It is designed for a user > application who wants to allocate IO buffer and set IO buffer address > only after it receives an IO request from ublksrv. This is a reasonable > scenario because these users may use a RPC framework as one IO backend > to handle IO requests passed from ublksrv. And a RPC framework may > allocate its own buffer(or memory pool). > > This new feature (UBLK_F_NEED_GET_DATA) is optional for ublk users. > Related userspace code has been added in ublksrv[1] as one pull request. > > Test cases for this feature are added in ublksrv and all the tests pass. > The performance result shows that this new feature does bring additional > latency because one IO is issued back to ublk_drv once again to copy data > from bio vectors to user-provided data buffer. UBLK_IO_NEED_GET_DATA is > suitable for bigger block size such as 512B or 1MB. > > [1] https://github.com/ming1/ubdsrv > > Signed-off-by: ZiyangZhang <ZiyangZhang@xxxxxxxxxxxxxxxxx> Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx> Thanks, Ming