Skip to content

Conversation

patricoferris
Copy link
Contributor

This PR adds a Uring.probe () function that checks the kernel's support for the various io_uring operations that we currently use (I think I got all of them). Hopefully this can help with ocaml-multicore/eio#187 and could be used in Eio_main for Linux to check if we can using the io_uring backend before defaulting to libuv.

Copy link
Collaborator

@talex5 talex5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think commenting out the strings like this will work; io_uring_opcode_supported only sees the index, not the string.

Also, while this function is useful for Eio at the moment (which can switch to luv if anything is missing), in general users will want to probe individual features themselves. As new calls get added, Eio might want to use them only if available.

So probably we should add the IO_URING_OP_* values to lib/uring/include/discover.ml and expose them in the interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants