public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCHSET v3 0/5] Add io_uring support for waitid
@ 2023-08-11 14:16 Jens Axboe
  2023-08-11 14:16 ` [PATCH 1/5] exit: abstract out should_wake helper for child_wait_callback() Jens Axboe
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Jens Axboe @ 2023-08-11 14:16 UTC (permalink / raw)
  To: io-uring, linux-kernel; +Cc: brauner, arnd

Hi,

This adds support for IORING_OP_WAITID, which is an async variant of
the waitid(2) syscall. Rather than have a parent need to block waiting
on a child task state change, it can now simply get an async notication
when the requested state change has occured.

Patches 1..4 are purely prep patches, and should not have functional
changes. They split out parts of do_wait() into __do_wait(), so that
the prepare-to-wait and sleep parts are contained within do_wait().

Patch 5 adds io_uring support.

I wrote a few basic tests for this, which can be found in the
'waitid' branch of liburing:

https://git.kernel.dk/cgit/liburing/log/?h=waitid

Also spun a custom kernel for someone to test it, and no issues reported
so far.

 include/linux/io_uring_types.h |   2 +
 include/uapi/linux/io_uring.h  |   2 +
 io_uring/Makefile              |   2 +-
 io_uring/cancel.c              |   5 +
 io_uring/io_uring.c            |   3 +
 io_uring/opdef.c               |   9 +
 io_uring/waitid.c              | 312 +++++++++++++++++++++++++++++++++
 io_uring/waitid.h              |  15 ++
 kernel/exit.c                  | 129 ++++++++------
 kernel/exit.h                  |  30 ++++
 10 files changed, 450 insertions(+), 59 deletions(-)

The code can also be found here:

https://git.kernel.dk/cgit/linux/log/?h=io_uring-waitid

Changes since v2:
- Get rid of 'f_flags' in kernel_waitid_prepare() (Christian)

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCHSET v4 0/5] Add io_uring support for waitid
@ 2023-09-09 15:11 Jens Axboe
  2023-09-09 15:11 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
  0 siblings, 1 reply; 21+ messages in thread
From: Jens Axboe @ 2023-09-09 15:11 UTC (permalink / raw)
  To: io-uring, linux-kernel; +Cc: brauner, arnd, asml.silence

Hi,

This adds support for IORING_OP_WAITID, which is an async variant of
the waitid(2) syscall. Rather than have a parent need to block waiting
on a child task state change, it can now simply get an async notication
when the requested state change has occured.

Patches 1..4 are purely prep patches, and should not have functional
changes. They split out parts of do_wait() into __do_wait(), so that
the prepare-to-wait and sleep parts are contained within do_wait().

Patch 5 adds io_uring support.

I wrote a few basic tests for this, which can be found in the
'waitid' branch of liburing:

https://git.kernel.dk/cgit/liburing/log/?h=waitid

Also spun a custom kernel for someone to test it, and no issues reported
so far.

The code can also be found here:

https://git.kernel.dk/cgit/linux/log/?h=io_uring-waitid

 include/linux/io_uring_types.h |   2 +
 include/uapi/linux/io_uring.h  |   2 +
 io_uring/Makefile              |   3 +-
 io_uring/cancel.c              |   5 +
 io_uring/io_uring.c            |   3 +
 io_uring/opdef.c               |  10 +-
 io_uring/waitid.c              | 372 +++++++++++++++++++++++++++++++++
 io_uring/waitid.h              |  15 ++
 kernel/exit.c                  | 131 ++++++------
 kernel/exit.h                  |  30 +++
 10 files changed, 512 insertions(+), 61 deletions(-)

Changes since v3:
- Rebase on current tree
- Move it before the futex changes. Note that if you're testing this,
  this means that the opcode values have changed. The liburing repo
  has been rebased as a result as well, you'll want to update that too.
  liburing also has update test cases.
- Fix races between cancelation and wakeup trigger. This follows a
  scheme similar to the internal poll io_uring handling

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCHSET v2] Add io_uring support for waitid
@ 2023-08-02 23:14 Jens Axboe
  2023-08-02 23:14 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
  0 siblings, 1 reply; 21+ messages in thread
From: Jens Axboe @ 2023-08-02 23:14 UTC (permalink / raw)
  To: io-uring, linux-kernel; +Cc: brauner, arnd

Hi,

This adds support for IORING_OP_WAITID, which is an async variant of
the waitid(2) syscall. Rather than have a parent need to block waiting
on a child task state change, it can now simply get an async notication
when the requested state change has occured.

Patches 1..4 are purely prep patches, and should not have functional
changes. They split out parts of do_wait() into __do_wait(), so that
the prepare-to-wait and sleep parts are contained within do_wait().

Patch 5 adds io_uring support.

I wrote a few basic tests for this, which can be found in the
'waitid' branch of liburing:

https://git.kernel.dk/cgit/liburing/log/?h=waitid

Also spun a custom kernel for someone to test it, and no issues reported
so far.

 include/linux/io_uring_types.h |   2 +
 include/uapi/linux/io_uring.h  |   2 +
 io_uring/Makefile              |   2 +-
 io_uring/cancel.c              |   5 +
 io_uring/io_uring.c            |   3 +
 io_uring/opdef.c               |   9 +
 io_uring/waitid.c              | 313 +++++++++++++++++++++++++++++++++
 io_uring/waitid.h              |  15 ++
 kernel/exit.c                  | 132 +++++++-------
 kernel/exit.h                  |  30 ++++
 10 files changed, 453 insertions(+), 60 deletions(-)

The code can also be found here:

https://git.kernel.dk/cgit/linux/log/?h=io_uring-waitid

Changes since v1:
- Rebase on io_uring-futex again, as that saw changes.
- Add compat handling of siginfo (Arnd)
- Add reviewed-by to patches 1+2
- Minor cleanups

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCHSET 0/5] Add io_uring support for waitid
@ 2023-07-11 20:43 Jens Axboe
  2023-07-11 20:43 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
  0 siblings, 1 reply; 21+ messages in thread
From: Jens Axboe @ 2023-07-11 20:43 UTC (permalink / raw)
  To: io-uring, linux-kernel; +Cc: brauner, arnd

Hi,

This adds support for IORING_OP_WAITID, which is an async variant of
the waitid(2) syscall. Rather than have a parent need to block waiting
on a child task state change, it can now simply get an async notication
when the requested state change has occured.

Patches 1..4 are purely prep patches, and should not have functional
changes. They split out parts of do_wait() into __do_wait(), so that
the prepare-to-wait and sleep parts are contained within do_wait().

Patch 5 adds io_uring support.

I wrote a few basic tests for this, which can be found in the
'waitid' branch of liburing:

https://git.kernel.dk/cgit/liburing/log/?h=waitid

 include/linux/io_uring_types.h |   2 +
 include/uapi/linux/io_uring.h  |   2 +
 io_uring/Makefile              |   2 +-
 io_uring/cancel.c              |   5 +
 io_uring/io_uring.c            |   3 +
 io_uring/opdef.c               |   9 ++
 io_uring/waitid.c              | 271 +++++++++++++++++++++++++++++++++
 io_uring/waitid.h              |  15 ++
 kernel/exit.c                  | 132 +++++++++-------
 kernel/exit.h                  |  30 ++++
 10 files changed, 411 insertions(+), 60 deletions(-)

The code can also be found here:

https://git.kernel.dk/cgit/linux/log/?h=io_uring-waitid

-- 
Jens Axboe



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

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

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 14:16 [PATCHSET v3 0/5] Add io_uring support for waitid Jens Axboe
2023-08-11 14:16 ` [PATCH 1/5] exit: abstract out should_wake helper for child_wait_callback() Jens Axboe
2023-08-11 14:16 ` [PATCH 2/5] exit: move core of do_wait() into helper Jens Axboe
2023-08-11 14:16 ` [PATCH 3/5] exit: add kernel_waitid_prepare() helper Jens Axboe
2023-08-11 14:16 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
2023-08-11 14:16 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2023-09-09 15:11 [PATCHSET v4 0/5] Add io_uring support for waitid Jens Axboe
2023-09-09 15:11 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-08-02 23:14 [PATCHSET v2] Add io_uring support for waitid Jens Axboe
2023-08-02 23:14 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-08-09 11:27   ` Christian Brauner
2023-08-09 15:11     ` Jens Axboe
2023-07-11 20:43 [PATCHSET 0/5] Add io_uring support for waitid Jens Axboe
2023-07-11 20:43 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-07-11 21:11   ` Arnd Bergmann
2023-07-11 21:22     ` Jens Axboe
2023-07-11 22:18       ` Jens Axboe
2023-07-14 15:47         ` Christian Brauner
2023-07-14 18:33           ` Arnd Bergmann
2023-07-14 20:14             ` Jens Axboe
2023-07-15  7:12               ` Arnd Bergmann
2023-07-15 14:06                 ` Jens Axboe
2023-07-15 14:34                   ` Jens Axboe
2023-07-15 20:23                   ` Jens Axboe

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