Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

would like a new io_uring-based socket transport #684

Open
jlevon opened this issue May 13, 2022 · 0 comments
Open

would like a new io_uring-based socket transport #684

jlevon opened this issue May 13, 2022 · 0 comments

Comments

@jlevon
Copy link
Collaborator

jlevon commented May 13, 2022

The current socket transport code we have in tran_sock has a few issues:

In general, in non-blocking mode, we should never get "stuck" in vfu_run_ctx(): if we can't do IO to the socket, we need to remember our state somehow, and return to the vfu_run_ctx() caller. Potentially we could do this by re-using the "pending message" code; this will require a bunch of refactoring so we only read/write from the socket in "known good" places we are able to return to.

As a first phase, we could implement an io_uring transport that's like tran sock, but doesn't require the system call. But it should be designed such that it's restartable to account for the future usage above.
As io_uring support is not in every kernel version, we should use it automatically, but fall back if we don't find the features we need.

One stumbling block is that SPDK's epoll_wait() loop doesn't look for writable events, so if we're blocked on a socket write, we would be stuck. We'll need to consider that.

vfu_dma_read/write(), as APIs, need some complete reworking. this is lower priority.

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

No branches or pull requests

1 participant