public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCHSET 0/15] Get rid of ->prep_async()
@ 2024-03-20  1:17 Jens Axboe
  2024-03-20  1:17 ` [PATCH 01/15] io_uring/net: switch io_send() and io_send_zc() to using io_async_msghdr Jens Axboe
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Jens Axboe @ 2024-03-20  1:17 UTC (permalink / raw)
  To: io-uring

Hi,

This patchset gets rid of on-stack state, that is then fixed up and
copied if we need to go async. Having to do this fixup is nasty
business, and this is the main motivation for the change.

Opcodes are converted to setting up their async context at prep time,
which means that everything is stable beyond that. No more special
io_req_prep_async() handling, and no more "oops we can't proceed,
let's now allocate memory, copy state, and be ready for a retry".
By default, opcodes are now always ready for a retry, and the issue
path can be simplified. This is most readily apparent in the read/write
handling, but can be seen on the net side too.

The diffstat reflects that, but doesn't even tell the full story. Most
of the added lines are trivial, whereas some of the removed lines are
pretty hairy.

Lightly tested - passes all tests.

 include/linux/io_uring_types.h |   2 +
 io_uring/io_uring.c            |  42 +---
 io_uring/io_uring.h            |   1 -
 io_uring/net.c                 | 539 ++++++++++++++++++-----------------------
 io_uring/net.h                 |  10 +-
 io_uring/opdef.c               |  65 +++--
 io_uring/opdef.h               |   9 +-
 io_uring/rw.c                  | 536 +++++++++++++++++++---------------------
 io_uring/rw.h                  |  27 ++-
 io_uring/uring_cmd.c           |  77 ++++--
 io_uring/uring_cmd.h           |  11 +-
 11 files changed, 613 insertions(+), 706 deletions(-)

-- 
Jens Axboe


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

end of thread, other threads:[~2024-03-20  1:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20  1:17 [PATCHSET 0/15] Get rid of ->prep_async() Jens Axboe
2024-03-20  1:17 ` [PATCH 01/15] io_uring/net: switch io_send() and io_send_zc() to using io_async_msghdr Jens Axboe
2024-03-20  1:17 ` [PATCH 02/15] io_uring/net: switch io_recv() " Jens Axboe
2024-03-20  1:17 ` [PATCH 03/15] io_uring/net: unify cleanup handling Jens Axboe
2024-03-20  1:17 ` [PATCH 04/15] io_uring/net: always setup an io_async_msghdr Jens Axboe
2024-03-20  1:17 ` [PATCH 05/15] io_uring/net: get rid of ->prep_async() for receive side Jens Axboe
2024-03-20  1:17 ` [PATCH 06/15] io_uring/net: get rid of ->prep_async() for send side Jens Axboe
2024-03-20  1:17 ` [PATCH 07/15] io_uring: kill io_msg_alloc_async_prep() Jens Axboe
2024-03-20  1:17 ` [PATCH 08/15] io_uring/net: add iovec recycling Jens Axboe
2024-03-20  1:17 ` [PATCH 09/15] io_uring/net: drop 'kmsg' parameter from io_req_msg_cleanup() Jens Axboe
2024-03-20  1:17 ` [PATCH 10/15] io_uring/rw: always setup io_async_rw for read/write requests Jens Axboe
2024-03-20  1:17 ` [PATCH 11/15] io_uring: get rid of struct io_rw_state Jens Axboe
2024-03-20  1:17 ` [PATCH 12/15] io_uring/rw: add iovec recycling Jens Axboe
2024-03-20  1:17 ` [PATCH 13/15] io_uring/net: move connect to always using async data Jens Axboe
2024-03-20  1:17 ` [PATCH 14/15] io_uring/uring_cmd: switch to always allocating " Jens Axboe
2024-03-20  1:17 ` [PATCH 15/15] io_uring: drop ->prep_async() Jens Axboe

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