You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To minimize impact on normal tokio application code base, tokio-uring should also support something other than thread per core model (or pinning futures to specific threads), such as work stealing scheduler.
I would like to share my approach to make this happen
Each Tokio worker thread will have its own ring, accessed via thread-local storage.
When an operation is submitted to the ring, that ring will handle its completion and task notification(waker).
Futures can be safely shared across threads as it's used to be.
Worker threads will park using io_uring_enter with min_complete=1 (can be changed since there is no need to call kernel for CQ if SQ is submitted)
Since it will be modified by different threads (submitter and poller) operation information must be held thread safe.
Operation cancellation will be asynchronous, potentially using IORING_OP_MSG_RING or an MPSC channel.
This approach eliminates the need for epoll.
This design enables horizontal scalability by using a dedicated ring per thread and thread-local rings will make coding this implementation relatively straightforward.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To minimize impact on normal tokio application code base, tokio-uring should also support something other than thread per core model (or pinning futures to specific threads), such as work stealing scheduler.
I would like to share my approach to make this happen
IORING_OP_MSG_RING
or an MPSC channel.This design enables horizontal scalability by using a dedicated ring per thread and thread-local rings will make coding this implementation relatively straightforward.
I would like to get opinions about this approach.
Beta Was this translation helpful? Give feedback.
All reactions