History

io_uring: add option to remove SQ indirection

Not many aware, but io_uring submission queue has two levels. The first level usually appears as sq_array and stores indexes into the actual SQ. To my knowledge, no one has ever seriously used it, nor liburing exposes it to users. Add IORING_SETUP_NO_SQARRAY, when set we don't bother creating and using the sq_array and SQ heads/tails will be pointing directly into the SQ. Improves memory footprint, in term of both allocations as well as cache usage, and also should make io_get_sqe() less branchy in the end.

Pavel Begunkov committed 3 years ago

Commit 2af89ab1 parent e5598d62 files · +37 −20Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+5−0
@@ -185,6 +185,11 @@ enum { · 184 unmodified lines
185 */185 */
186#define IORING_SETUP_REGISTERED_FD_ONLY (1U << 15)186#define IORING_SETUP_REGISTERED_FD_ONLY (1U << 15)
187 187
188/*
189 * Removes indirection through the SQ index array.
190 */
191#define IORING_SETUP_NO_SQARRAY (1U << 16)
192
188enum io_uring_op {193enum io_uring_op {
189 IORING_OP_NOP,194 IORING_OP_NOP,
190 IORING_OP_READV,195 IORING_OP_READV,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t