Closed lorislibralato closed 7 months ago
If we compare with the legacy provided buffers, i.e. IORING_OP_PROVIDE_BUFFERS
, then yes, buf_ring
is more performant, not needing to queue extra requests is a huge win.
But note that to use multishot receives in the first place you need one of those -- multishots potentially run indefinitely and you need a way to feed it buffers.
I didn't explained well, If i use io_uring_register_buffer on a buffer added to a buf_ring does It optimize the buffer operations?
I didn't explained well, If i use io_uring_register_buffer on a buffer added to a buf_ring does It optimize the buffer operations?
No, it does not. The kernel doesn't keep track of that association.
If one day there would be providing registered buffers of some sort it should be explicitly reflected in the user API. And nobody cared to implement it because it wouldn't help anyway for the same reason why registered buffers are useless for recv / recvmsg -- there is a memcpy inside the net stack.
A side note, there is a zerocopy recv in development, it requires registered buffers, and long merged send zc also optionally benefits from registered buffers, but for both it's quite explicit.
Ok thanks!
Does registering the buffers used in the
buf_ring
give performance improvements with multishot operations?