mbox series

[liburing,v3,00/11] Defer taskrun changes

Message ID 20220905132258.1858915-1-dylany@fb.com (mailing list archive)
Headers show
Series Defer taskrun changes | expand

Message

Dylan Yudaken Sept. 5, 2022, 1:22 p.m. UTC
This series adds support to liburing for the IORING_SETUP_DEFER_TASKRUN flag.

This flag needs a couple of new API calls to force a call to get events for
users that are polling the io_uring fd (or a registered eventfd).

The second half of the series is a bit mixed and includes some documentation
fixes, overflow cleanups and test cleanups. I sent these a couple of months
ago and forgot about it, but now it does depend on the new API so it needs to
be ordered.
I can send it separately if you like.

Patches:

1 copies the definition from the kernel include file
2 introduces new APIs required for this feature
3/4/5 add tests for IORING_SETUP_DEFER_TASKRUN

6/7/8 clean and update existing documentation to match upstream
9 exposes the overflow state to the application
10 uses this and tests overflow functionality
11 gives an explicit warning if there is a short read in file-verify

Changes since v2:
 - Add documentation and .map file for new API
 - remove shutdown test

Changes since v1:
 - update tests to require IORING_SETUP_SINGLE_ISSUER
 - add docs for IORING_SETUP_DEFER_TASKRUN
 - add shutdown test

Dylan Yudaken (11):
  Copy defer task run definition from kernel
  Add documentation for IORING_SETUP_DEFER_TASKRUN flag
  add io_uring_submit_and_get_events and io_uring_get_events
  add a t_probe_defer_taskrun helper function for tests
  update existing tests for defer taskrun
  add a defer-taskrun test
  update io_uring_enter.2 docs for IORING_FEAT_NODROP
  add docs for overflow lost errors
  expose CQ ring overflow state
  overflow: add tests
  file-verify test: log if short read

 man/io_uring_cq_has_overflow.3       |  25 ++
 man/io_uring_enter.2                 |  24 +-
 man/io_uring_get_events.3            |  33 +++
 man/io_uring_setup.2                 |  30 ++-
 man/io_uring_submit_and_get_events.3 |  31 +++
 src/include/liburing.h               |  12 +
 src/include/liburing/io_uring.h      |   7 +
 src/liburing.map                     |   2 +
 src/queue.c                          |  26 ++-
 test/Makefile                        |   1 +
 test/cq-overflow.c                   | 243 ++++++++++++++++++-
 test/defer-taskrun.c                 | 333 +++++++++++++++++++++++++++
 test/eventfd-disable.c               |  33 ++-
 test/file-verify.c                   |   4 +
 test/helpers.c                       |  17 +-
 test/helpers.h                       |   2 +
 test/iopoll.c                        |  17 +-
 test/multicqes_drain.c               |  50 +++-
 test/poll-mshot-overflow.c           |  40 +++-
 test/recv-multishot.c                |  33 ++-
 test/rsrc_tags.c                     |  10 +-
 21 files changed, 922 insertions(+), 51 deletions(-)
 create mode 100644 man/io_uring_cq_has_overflow.3
 create mode 100644 man/io_uring_get_events.3
 create mode 100644 man/io_uring_submit_and_get_events.3
 create mode 100644 test/defer-taskrun.c


base-commit: 3bd7d6b27e6b7d7950bba1491bc9c385378fe4dd

Comments

Ammar Faizi Sept. 5, 2022, 1:45 p.m. UTC | #1
On 9/5/22 8:22 PM, Dylan Yudaken wrote:
> Dylan Yudaken (11):
>    Copy defer task run definition from kernel
>    Add documentation for IORING_SETUP_DEFER_TASKRUN flag
>    add io_uring_submit_and_get_events and io_uring_get_events
>    add a t_probe_defer_taskrun helper function for tests
>    update existing tests for defer taskrun
>    add a defer-taskrun test
>    update io_uring_enter.2 docs for IORING_FEAT_NODROP
>    add docs for overflow lost errors
>    expose CQ ring overflow state
>    overflow: add tests

Build tested each patch with GitHub bot, everything builds fine:

    https://github.com/ammarfaizi2/liburing/commits/testing/20220905132258.1858915-1-dylany@fb.com

Tested-by: Ammar Faizi <ammarfaizi2@gnuweeb.org> # Build
Jens Axboe Sept. 5, 2022, 5:42 p.m. UTC | #2
On Mon, 5 Sep 2022 06:22:47 -0700, Dylan Yudaken wrote:
> This series adds support to liburing for the IORING_SETUP_DEFER_TASKRUN flag.
> 
> This flag needs a couple of new API calls to force a call to get events for
> users that are polling the io_uring fd (or a registered eventfd).
> 
> The second half of the series is a bit mixed and includes some documentation
> fixes, overflow cleanups and test cleanups. I sent these a couple of months
> ago and forgot about it, but now it does depend on the new API so it needs to
> be ordered.
> I can send it separately if you like.
> 
> [...]

Applied, thanks!

[01/11] Copy defer task run definition from kernel
        commit: 1999c963b86b0378b44edb2820e9d5102b7b531a
[02/11] Add documentation for IORING_SETUP_DEFER_TASKRUN flag
        commit: f8bac73b2529d33a10002905351c08f9cc457fd7
[03/11] add io_uring_submit_and_get_events and io_uring_get_events
        commit: daa5b2dff32f0ba3383d66b48badf122bd6d2898
[04/11] add a t_probe_defer_taskrun helper function for tests
        commit: cc2e1bce106f2356c3a3ddd528b56980b8ea8a77
[05/11] update existing tests for defer taskrun
        commit: f91105d5495546403ec5c15aa0768ae6a93d5ab1
[06/11] add a defer-taskrun test
        commit: bfca8f112cf1bd9cf8781cdcaa8f0f52bc727506
[07/11] update io_uring_enter.2 docs for IORING_FEAT_NODROP
        commit: f84b884aa865435ca2e691dad72d6c89529eb60b
[08/11] add docs for overflow lost errors
        commit: d5be8c01ee0d80f20da17fbc8b241d44157c06b6
[09/11] expose CQ ring overflow state
        commit: 3f2835810413beee65dad84a69b1c6280fb79eb8
[10/11] overflow: add tests
        commit: c9663ac060552aa4dc3f1b5af0fb5319a2a9b24e
[11/11] file-verify test: log if short read
        commit: 8bcc9029e3f7292bd17ed67d48c1122f1d56e36b

Best regards,