Skip to content

Investigate io_uring submission queue's enqueueSqe performance #15662

@franz1981

Description

@franz1981

#14962 has introduced a safe method (using NIO ByteBuffer) to interact with io_uring queues, but as usual, this doesn't come for free: it would be good to verify that performance is not impacted and/or mitigate it, in case.

The completion's queue array decoding seems to read way less fields, but should require the same analysis.

This work has been motivated by https://github.com/openjdk/loom/blob/c25b25646e23bccd04265ee5aaa907d0945f323d/src/java.base/linux/classes/jdk/internal/ffi/generated/iouring/io_uring_sqe.java and https://github.com/openjdk/loom/blob/c25b25646e23bccd04265ee5aaa907d0945f323d/src/java.base/linux/classes/sun/nio/ch/iouring/IOUring.java#L570-L609 which:

  • uses sliced MemorySegments
  • zeoed

The last one is something I'm happy we don't do, but fixed offset accesses on trusted memory segment (i.e. with base offset, memory address and endiannes constant) could give some performance advantage over NIO ByteBuffer,

In #15486 we've evaluated that VarHandles byte buffer view to be very performant, but we lack to verify how it fear compared to MemorySegment in this scenario (indexed accesses) - and if it matters, in the grand scheme.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions