linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
	ZiyangZhang <ZiyangZhang@linux.alibaba.com>,
	Harris James R <james.r.harris@intel.com>,
	Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V3 0/7] ublk: cleanup and support user copy
Date: Fri, 19 May 2023 14:50:23 +0800	[thread overview]
Message-ID: <20230519065030.351216-1-ming.lei@redhat.com> (raw)

Hello,

The 1st 3 patch are cleanup.

The other patches support 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[1]. Meantime both sides becomes cleaner. Also it can be thought as
prep patch for supporting zero copy.

ublksrv loop usercopy code:

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

[1] https://lore.kernel.org/linux-block/116d8a56-0881-56d3-9bcc-78ff3e1dc4e5@linux.alibaba.com/T/#m23bd4b8634c0a054e6797063167b469949a247bb


V3:
	- rebase on for-6.5/block
	- run xfstests and not see regression

V2:
	- rebase on latest linus tree


Ming Lei (7):
  ublk: kill queuing request by task_work_add
  ublk: cleanup io cmd code path by adding ublk_fill_io_cmd()
  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(-)

-- 
2.40.1


             reply	other threads:[~2023-05-19  6:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19  6:50 Ming Lei [this message]
2023-05-19  6:50 ` [PATCH V3 1/7] ublk: kill queuing request by task_work_add Ming Lei
2023-05-19  6:50 ` [PATCH V3 2/7] ublk: cleanup io cmd code path by adding ublk_fill_io_cmd() Ming Lei
2023-05-19  6:50 ` [PATCH V3 3/7] ublk: cleanup ublk_copy_user_pages Ming Lei
2023-05-19  6:50 ` [PATCH V3 4/7] ublk: grab request reference when the request is handled by userspace Ming Lei
2023-05-19  6:50 ` [PATCH V3 5/7] ublk: support to copy any part of request pages Ming Lei
2023-05-19  6:50 ` [PATCH V3 6/7] ublk: add read()/write() support for ublk char device Ming Lei
2023-05-19  6:50 ` [PATCH V3 7/7] ublk: support user copy Ming Lei
2023-05-20  2:04 ` [PATCH V3 0/7] ublk: cleanup and " Jens Axboe

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=20230519065030.351216-1-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=ZiyangZhang@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=james.r.harris@intel.com \
    --cc=linux-block@vger.kernel.org \
    /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).