Skip to content

Commit

Permalink
Merge pull request #10 from baruch/add_submit_all_coop_taskrun
Browse files Browse the repository at this point in the history
Add submit all  and coop taskrun setup flags
  • Loading branch information
tchaloupka committed Apr 14, 2023
2 parents f9ee66c + 5d81ac3 commit 8f7cf45
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions source/during/io_uring.d
Expand Up @@ -783,6 +783,37 @@ enum SetupFlags : uint
* Note: Available from Linux 5.10
*/
R_DISABLED = 1U << 6, /* start with ring disabled */

/**
* `IORUNG_SETUP_SUBMIT_ALL`
*
* Normally io_uring stops submitting a batch of request, if one of these
* requests results in an error. This can cause submission of less than
* what is expected, if a request ends in error while being submitted. If
* the ring is created withthis flag,
*
* Note: Available from Linux 5.18
*/
SUBMIT_ALL = 1U << 7, /* continue submit on error */

/**
* `IORING_SETUP_COOP_TASKRUN`
*
* By default, io_uring will interrupt a task running in userspace when a
* completion event comes in. This is to ensure that completions run in a timely
* manner. For a lot of use cases, this is overkill and can cause reduced
* performance from both the inter-processor interrupt used to do this, the
* kernel/user transition, the needless interruption of the tasks userspace
* activities, and reduced batching if completions come in at a rapid rate. Most
* applications don't need the forceful interruption, as the events are processed
* at any kernel/user transition. The exception are setups where the application
* uses multiple threads operating on the same ring, where the application
* waiting on completions isn't the one that submitted them. For most other
* use cases, setting this flag will improve performance.
*
* Note: Available since 5.19.
*/
COOP_TASKRUN = 1U << 8,
}

/// `io_uring_params->features` flags
Expand Down

0 comments on commit 8f7cf45

Please sign in to comment.