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

IORING_FEAT_FAST_POLL question #5

Closed
romange opened this issue Apr 6, 2020 · 5 comments
Closed

IORING_FEAT_FAST_POLL question #5

romange opened this issue Apr 6, 2020 · 5 comments

Comments

@romange
Copy link

romange commented Apr 6, 2020

Hi,

I do not see anything in your code that does something differently. what IORING_FEAT_FAST_POLL does and where exactly you use it? (besides testing it in the features)

@frevib
Copy link
Owner

frevib commented Apr 6, 2020

Hi Roman, have a look at this brach: https:/frevib/io_uring-echo-server/tree/io-uring-feat-fast-poll

With IORING_FEAT_FAST_POLL you don’t have to poll a socket for ready data. So you can just call a recv (io_uring_prep_recv) on a socket and the moment there’s data ready it will complete and return as acqe on your ring. Because you don’t have to poll, you save a sys call. This can result in much better performance: https:/frevib/io_uring-echo-server/blob/io-uring-feat-fast-poll/benchmarks/benchmarks.md

@romange
Copy link
Author

romange commented Apr 6, 2020 via email

@Sherlock-Holo
Copy link

@frevib That makes me confuse, when the fast poll doesn't exist in old kernel, I still can readv the tcp socket directly through io_uring, so what fast poll actually do in the new kernel?

@eecheng87
Copy link

Hi, @frevib
In io_uring-echo-server example, I only saw you check whether IORING_FEAT_FAST_POLL is supported.

Don't we set the flag before io_uring_queue_init_params? Is this feature is default?

Thanks in advance.

@frevib
Copy link
Owner

frevib commented Aug 19, 2021

Hi,

This echo server was built a two years ago when io_uring was not very well known and didn’t have many features. So maybe things have changed and we need so set io_uring_queue_init_params like you say, but I don’t know.

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

4 participants