Io uring: Difference between revisions

Tags: Mobile edit Mobile web edit
Tags: Mobile edit Mobile web edit
Line 53: Line 53:
| IORING_SETUP_CQSIZE || 5.1 || Create the completion queue with <tt>cq_entries</tt> entries. This value must be greater than <tt>entries</tt>, and might be rounded up to the next power of 2.
| IORING_SETUP_CQSIZE || 5.1 || Create the completion queue with <tt>cq_entries</tt> entries. This value must be greater than <tt>entries</tt>, and might be rounded up to the next power of 2.
|-
|-
| IORING_SETUP_CLAMP || 5.1 ||
| IORING_SETUP_CLAMP || 5.1 || Clamp <tt>entries</tt> at <tt>IORING_MAX_ENTRIES</tt> and <tt>cq_entries</tt> at <tt>IORING_MAX_CQ_ENTRIES</tt>.
|-
|-
| IORING_SETUP_ATTACH_WQ || 5.1 ||  
| IORING_SETUP_ATTACH_WQ || 5.1 || Specify a uring in <tt>wq_fd</tt>, and the new uring will share that uring's worker thread backend.
|-
|-
| IORING_SETUP_R_DISABLED || 5.10 || Start the uring disabled, requiring that it be enabled with <tt>io_uring_register(2)</tt>.
| IORING_SETUP_R_DISABLED || 5.10 || Start the uring disabled, requiring that it be enabled with <tt>io_uring_register(2)</tt>.
Line 61: Line 61:
| IORING_SETUP_SUBMIT_ALL || 5.18 || Continue submitting SQEs from a batch even after one results in error.
| IORING_SETUP_SUBMIT_ALL || 5.18 || Continue submitting SQEs from a batch even after one results in error.
|-
|-
| IORING_SETUP_COOP_TASKRUN || 5.19 ||
| IORING_SETUP_COOP_TASKRUN || 5.19 || Don't interrupt userspace processes to indicate CQE availability. It's usually desirable to allow events to be processed at arbitrary kernelspace transitions, in which case this flag can be provided to improve performance.
|-
|-
| IORING_SETUP_TASKRUN_FLAG || 5.19 ||
| IORING_SETUP_TASKRUN_FLAG || 5.19 || Requires <tt>IORING_SETUP_COOP_TASKRUN</tt>. When completions are pending awaiting processing, the <tt>IORING_SQ_TASKRUN</tt> flag will be set in the submission ring. This will be checked by <tt>io_uring_peek_cqe()</tt>, which will enter the kernel to process them.
|-
|-
| IORING_SETUP_SQE128 || 5.19 || Use 128-byte SQEs, necessary for NVMe passthroughs using <tt>IORING_OP_URING_CMD</tt>.
| IORING_SETUP_SQE128 || 5.19 || Use 128-byte SQEs, necessary for NVMe passthroughs using <tt>IORING_OP_URING_CMD</tt>.
Line 71: Line 71:
| IORING_SETUP_SINGLE_ISSUER || 6.0 || Hint to the kernel that only a single thread will submit requests, allowing for optimizations. This thread must either be the thread which created the ring, or (iff <tt>IORING_SETUP_R_DISABLED</tt> is used) the thread which enables the ring.
| IORING_SETUP_SINGLE_ISSUER || 6.0 || Hint to the kernel that only a single thread will submit requests, allowing for optimizations. This thread must either be the thread which created the ring, or (iff <tt>IORING_SETUP_R_DISABLED</tt> is used) the thread which enables the ring.
|-
|-
| IORING_SETUP_DEFER_TASKRUN || 6.1 ||
| IORING_SETUP_DEFER_TASKRUN || 6.1 || Requires <tt>IORING_SETUP_SINGLE_ISSUER</tt>. Don't process completions at arbitrary kernel/scheduler transitions, but only <tt>io_uring_enter(2)</tt> when called with <tt>IORING_ENTER_GETEVENTS</tt> by the thread that submitted the SQEs.
|-
|-
|}
|}