Replies: 1 comment 2 replies
-
You can't share the workers across a process, only threads. The reason for that is that the helper needs to present the same mm/credentials/etc to safely handle async operations, and if you have multiple processes involved, then that cannot be done in a sane manner. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've got an application that instantiates a completely separate process per user, with each process having its own threads/co-routines. These co-routines do many things, including IO using read/readv and write/writev. Sometimes there are hundreds of users connected to a single host, such that there would be hundreds of these processes handling IO with their co-routines.
We're looking at implementing io_uring in this process, where we'd roughly have an io_uring per thread, that co-routines could submit/complete IO against. That's all well and good. We'd like use IORING_SETUP_ATTACH_WQ such that within the process would share a workqueue, and perhaps even use sq poll.
As a further optimization, is it possible to share the kernel backend via IORING_SETUP_ATTACH_WQ, such that the io_uring instances between these processes bring up could share a workqueue / SQ poller?
Beta Was this translation helpful? Give feedback.
All reactions