public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 00/10] io_uring/ublk: exit notifier support
@ 2023-09-18  4:10 Ming Lei
  2023-09-18  4:10 ` [PATCH 01/10] io_uring: allocate ctx id and build map between id and ctx Ming Lei
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Ming Lei @ 2023-09-18  4:10 UTC (permalink / raw)
  To: Jens Axboe, linux-block, io-uring; +Cc: ZiyangZhang, Ming Lei

Hello,

In do_exit(), io_uring needs to wait pending requests.

ublk is one uring_cmd driver, and its usage is a bit special by submitting
command for waiting incoming block IO request in advance, so if there
isn't any IO request coming, the command can't be completed. So far ublk
driver has to bind its queue with one ublk daemon server, meantime
starts one monitor work to check if this daemon is live periodically.
This way requires ublk queue to be bound one single daemon pthread, and
not flexible, meantime the monitor work is run in 3rd context, and the
implementation is a bit tricky.

The 1st 3 patches adds io_uring task exit notifier, and the other
patches converts ublk into this exit notifier, and the implementation
becomes more robust & readable, meantime it becomes easier to relax
the ublk queue/daemon limit in future, such as not require to bind
ublk queue with single daemon.

Ming Lei (10):
  io_uring: allocate ctx id and build map between id and ctx
  io_uring: pass io_uring_ctx->id to uring_cmd
  io_uring: support io_uring notifier for uring_cmd
  ublk: don't get ublk device reference in ublk_abort_queue()
  ublk: make sure ublk uring cmd handling is done in submitter task
    context
  ublk: make sure that uring cmd aiming at same queue won't cross
    io_uring contexts
  ublk: rename mm_lock as lock
  ublk: quiesce request queue when aborting queue
  ublk: replace monitor work with uring_cmd exit notifier
  ublk: simplify aborting request

 drivers/block/ublk_drv.c       | 216 +++++++++++++++++++--------------
 include/linux/io_uring.h       |  27 ++++-
 include/linux/io_uring_types.h |   3 +
 io_uring/io_uring.c            |  57 +++++++++
 io_uring/io_uring.h            |   4 +
 io_uring/uring_cmd.c           |  13 ++
 6 files changed, 230 insertions(+), 90 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2023-09-18 16:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18  4:10 [PATCH 00/10] io_uring/ublk: exit notifier support Ming Lei
2023-09-18  4:10 ` [PATCH 01/10] io_uring: allocate ctx id and build map between id and ctx Ming Lei
2023-09-18  4:10 ` [PATCH 02/10] io_uring: pass io_uring_ctx->id to uring_cmd Ming Lei
2023-09-18  4:10 ` [PATCH 03/10] io_uring: support io_uring notifier for uring_cmd Ming Lei
2023-09-18  4:11 ` [PATCH 04/10] ublk: don't get ublk device reference in ublk_abort_queue() Ming Lei
2023-09-18  4:11 ` [PATCH 05/10] ublk: make sure ublk uring cmd handling is done in submitter task context Ming Lei
2023-09-18  4:11 ` [PATCH 06/10] ublk: make sure that uring cmd aiming at same queue won't cross io_uring contexts Ming Lei
2023-09-18  4:11 ` [PATCH 07/10] ublk: rename mm_lock as lock Ming Lei
2023-09-18  4:11 ` [PATCH 08/10] ublk: quiesce request queue when aborting queue Ming Lei
2023-09-18  4:11 ` [PATCH 09/10] ublk: replace monitor work with uring_cmd exit notifier Ming Lei
2023-09-18  4:11 ` [PATCH 10/10] ublk: simplify aborting request Ming Lei
2023-09-18 12:54 ` [PATCH 00/10] io_uring/ublk: exit notifier support Jens Axboe
2023-09-18 13:24   ` Ming Lei
2023-09-18 14:15     ` Jens Axboe
2023-09-18 16:02       ` Ming Lei
2023-09-18 16:03         ` Jens Axboe

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