public inbox for [email protected]
 help / color / mirror / Atom feed
* [RFC PATCH V2 0/9] io_uring: support sqe group and provide group kbuf
@ 2024-05-06 16:22 Ming Lei
  2024-05-06 16:22 ` [RFC PATCH V2 1/9] io_uring: add io_link_req() helper Ming Lei
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Ming Lei @ 2024-05-06 16:22 UTC (permalink / raw)
  To: Jens Axboe, io-uring; +Cc: linux-block, Pavel Begunkov, Kevin Wolf, Ming Lei

Hello,

The 1st 4 patches are cleanup, and prepare for adding sqe group.

The 5th patch supports generic sqe group which is like link chain, but
allows each sqe in group to be issued in parallel, so N:M dependency can be
supported with sqe group & io link together.

The 6th patch supports one variant of sqe group: allow members to depend
on group leader, so that kernel resource lifetime can be aligned with
group leader or group, then any kernel resource can be shared in this
sqe group, and can be used in generic device zero copy.

The 7th & 8th patches supports providing sqe group buffer via the sqe
group variant.

The 9th patch supports ublk zero copy based on io_uring providing sqe
group buffer.

Tests:

1) pass liburing test
- make runtests

2) write/pass two sqe group test cases:

https://github.com/axboe/liburing/compare/master...ming1:liburing:sqe_group_v2

covers related sqe flags combination and linking groups, both nop and
one multi-destination file copy.

3) ublksrv zero copy:

ublksrv userspace implements zero copy by sqe group & provide group
kbuf:

	git clone https://github.com/ublk-org/ublksrv.git -b group-provide-buf_v2
	make test T=loop/009:nbd/061:nbd/062	#ublk zc tests

When running 64KB block size test on ublk-loop('ublk add -t loop --buffered_io -f $backing'),
it is observed that perf can be doubled.

Any comments are welcome!

V2:
	- add generic sqe group, suggested by Kevin Wolf
	- add REQ_F_SQE_GROUP_DEP which is based on IOSQE_SQE_GROUP, for sharing
	  kernel resource in group wide, suggested by Kevin Wolf
	- remove sqe ext flag, and use the last bit for IOSQE_SQE_GROUP(Pavel),
	in future we still can extend sqe flags with one uring context flag
	- initialize group requests via submit state pattern, suggested by Pavel
	- all kinds of cleanup & bug fixes

Ming Lei (9):
  io_uring: add io_link_req() helper
  io_uring: add io_submit_fail_link() helper
  io_uring: add helper of io_req_commit_cqe()
  io_uring: move marking REQ_F_CQE_SKIP out of io_free_req()
  io_uring: support SQE group
  io_uring: support sqe group with members depending on leader
  io_uring: support providing sqe group buffer
  io_uring/uring_cmd: support provide group kernel buffer
  ublk: support provide io buffer

 drivers/block/ublk_drv.c       | 158 ++++++++++++++-
 include/linux/io_uring/cmd.h   |   7 +
 include/linux/io_uring_types.h |  48 +++++
 include/uapi/linux/io_uring.h  |  10 +-
 include/uapi/linux/ublk_cmd.h  |   7 +-
 io_uring/io_uring.c            | 356 +++++++++++++++++++++++++++++----
 io_uring/io_uring.h            |  29 ++-
 io_uring/kbuf.c                |  60 ++++++
 io_uring/kbuf.h                |  13 ++
 io_uring/net.c                 |  31 ++-
 io_uring/opdef.c               |   5 +
 io_uring/opdef.h               |   2 +
 io_uring/rw.c                  |  20 +-
 io_uring/timeout.c             |   3 +
 io_uring/uring_cmd.c           |  28 +++
 15 files changed, 724 insertions(+), 53 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-10 14:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 16:22 [RFC PATCH V2 0/9] io_uring: support sqe group and provide group kbuf Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 1/9] io_uring: add io_link_req() helper Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 2/9] io_uring: add io_submit_fail_link() helper Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 3/9] io_uring: add helper of io_req_commit_cqe() Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 4/9] io_uring: move marking REQ_F_CQE_SKIP out of io_free_req() Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 5/9] io_uring: support SQE group Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 6/9] io_uring: support sqe group with members depending on leader Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 7/9] io_uring: support providing sqe group buffer Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 8/9] io_uring/uring_cmd: support provide group kernel buffer Ming Lei
2024-05-06 16:22 ` [RFC PATCH V2 9/9] ublk: support provide io buffer Ming Lei
2024-05-10 14:02 ` [RFC PATCH V2 0/9] io_uring: support sqe group and provide group kbuf Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox