mbox series

[0/7] ublk: cleanup and support user copy

Message ID 20230420154032.1272836-1-ming.lei@redhat.com (mailing list archive)
Headers show
Series ublk: cleanup and support user copy | expand

Message

Ming Lei April 20, 2023, 3:40 p.m. UTC
Hello,

The 1st 3 patch are cleanup.

The other patches supports to move data copy between io request pages and
userspace buffer into ublk server(userspace). This way avoids one round trip
of uring command(UBLK_F_NEED_GET_DATA), and solve buffer release issue for
READ. Meantime both sides becomes cleaner. Also it can be thought as
prep patch for supporting zero copy.


Ming Lei (7):
  ublk: kill queuing request by task_work_add
  ublk: cleanup io cmd code path by adding ublk_fill_io()
  ublk: cleanup ublk_copy_user_pages
  ublk: grab request reference when the request is handled by userspace
  ublk: support to copy any part of request pages
  ublk: add read()/write() support for ublk char device
  ublk: support user copy

 drivers/block/ublk_drv.c      | 457 +++++++++++++++++++++++++---------
 include/uapi/linux/ublk_cmd.h |  25 +-
 2 files changed, 361 insertions(+), 121 deletions(-)

Comments

Ming Lei April 20, 2023, 3:46 p.m. UTC | #1
On Thu, Apr 20, 2023 at 11:40:25PM +0800, Ming Lei wrote:
> Hello,
> 
> The 1st 3 patch are cleanup.
> 
> The other patches supports to move data copy between io request pages and
> userspace buffer into ublk server(userspace). This way avoids one round trip
> of uring command(UBLK_F_NEED_GET_DATA), and solve buffer release issue for
> READ. Meantime both sides becomes cleaner. Also it can be thought as
> prep patch for supporting zero copy.
> 
> 
> Ming Lei (7):
>   ublk: kill queuing request by task_work_add
>   ublk: cleanup io cmd code path by adding ublk_fill_io()
>   ublk: cleanup ublk_copy_user_pages
>   ublk: grab request reference when the request is handled by userspace
>   ublk: support to copy any part of request pages
>   ublk: add read()/write() support for ublk char device
>   ublk: support user copy
> 
>  drivers/block/ublk_drv.c      | 457 +++++++++++++++++++++++++---------
>  include/uapi/linux/ublk_cmd.h |  25 +-
>  2 files changed, 361 insertions(+), 121 deletions(-)

ublksrv code for supporting user copy(only loop implements it, and
easy for others to support it):

https://github.com/ming1/ubdsrv/commits/usercopy


Thanks,
Ming