Greetings!
A common approach for multi-threaded servers is to have a number of
threads equal to a number of cores and launch a separate ring in each
one. AFAIK currently if we want to send an event to a different ring, we
have to write-lock this ring, create SQE, and update the index ring.
Alternatively, we could use some kind of user-space message passing.
Such approaches are somewhat inefficient and I think it can be solved
elegantly by updating the io_uring_sqe type to allow accepting fd of a
ring to which CQE must be sent by kernel. It can be done by introducing
an IOSQE_ flag and using one of currently unused padding u64s.
Such feature could be useful for load balancing and message passing
between threads which would ride on top of io-uring, i.e. you could send
NOP with user_data pointing to a message payload.
Best regards,
Artyom Pavlov.