mbox series

[PATCHSET,0/3] Provide more efficient buffer registration

Message ID 20240911200705.392343-1-axboe@kernel.dk (mailing list archive)
Headers show
Series Provide more efficient buffer registration | expand

Message

Jens Axboe Sept. 11, 2024, 8:03 p.m. UTC
Hi,

Pretty much what the subject line says, it's about 25k to 40k times
faster to provide a way to duplicate an existing rings buffer
registration than it is manually map/pin/register the buffers again
with a new ring.

Patch 1 is just a prep patch, patch 2 adds refs to struct
io_mapped_ubuf, and patch 3 finally adds the register opcode to allow
a ring to duplicate the registered mappings from one ring to another.

This came about from discussing overhead from the varnish cache
project for cases with more dynamic ring/thread creation.

 include/uapi/linux/io_uring.h |  8 ++++
 io_uring/register.c           |  6 +++
 io_uring/rsrc.c               | 89 ++++++++++++++++++++++++++++++++++-
 io_uring/rsrc.h               |  2 +
 4 files changed, 104 insertions(+), 1 deletion(-)

Comments

Jens Axboe Sept. 11, 2024, 8:13 p.m. UTC | #1
On 9/11/24 2:03 PM, Jens Axboe wrote:
> Hi,
> 
> Pretty much what the subject line says, it's about 25k to 40k times
> faster to provide a way to duplicate an existing rings buffer
> registration than it is manually map/pin/register the buffers again
> with a new ring.
> 
> Patch 1 is just a prep patch, patch 2 adds refs to struct
> io_mapped_ubuf, and patch 3 finally adds the register opcode to allow
> a ring to duplicate the registered mappings from one ring to another.
> 
> This came about from discussing overhead from the varnish cache
> project for cases with more dynamic ring/thread creation.

Ignore this one, it was an old version... I'll send a v2 in a bit.