bbeaupain / nio_uring

High performance I/O library for Java using io_uring under the hood
MIT License
146 stars 8 forks source link

Linux 6.7 FUTEX support? #17

Open mattrpav opened 8 months ago

mattrpav commented 8 months ago

Interesting notes re FUTEX support for IO_URING in Linux 6.7

ref: https://www.phoronix.com/news/IO_uring-FUTEX-Linux-6.7

Can this Java IO_URING library take advantage?

bbeaupain commented 8 months ago

Great call out!

We don't currently use io_uring buffer pooling functionality, and nio_uring does not support modifying contents of buffers while I/O is being performed (current best practice is to achieve parallelism by initializing multiple rings and not sharing files/sockets among them), so we don't have the locking logic in place that would be able to utilize FUTEX support.

This will be great to keep in mind however with future upgrades.

bbeaupain commented 8 months ago

Also I'd like to note that the current parallelism limitations are a consequence of using liburing (which doesn't support thread safety, at least not clearly) instead of interacting with io_uring syscalls directly. We could probably achieve slightly better performance and flexibility by skipping liburing altogether, but it does save the nio_uring project from a lot of complexity at this time.

Leaving open for a while just to encourage further discussion from anyone that would like to add their thoughts.