Skip to content

Don't hit the event loop when not waiting on I/O #8586

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

Closed
brson opened this issue Aug 18, 2013 · 4 comments
Closed

Don't hit the event loop when not waiting on I/O #8586

brson opened this issue Aug 18, 2013 · 4 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@brson
Copy link
Contributor

brson commented Aug 18, 2013

I did a quick test on a message passing benchmark and avoiding the event loop was a 25% speedup. To do this right we need to keep our own I/O ref count in order to know when it's ok not to hit epoll.

@toddaaro
Copy link
Contributor

Is the goal to never hit the event loop while there is no IO, or do we want to have some strategy for avoiding the event loop if there is only a little IO? The former should be really easy, the latter could be complicated.

@brson
Copy link
Contributor Author

brson commented Aug 18, 2013

I have only considered the former. I don't have any ideas about the latter at the moment.

@toddaaro
Copy link
Contributor

Something that might not be obvious from the short description here is that doing this means we miss all async callbacks, but that is entirely ok. Not receiving them is fine as their only function is to make sure the scheduler is active doing work, which is the case if the scheduler doesn't receive them due to being active doing work.

@alexcrichton
Copy link
Member

Closing in favor of #8341, seems to be a bit more discussion in that bug (and it's about pretty much the same thing).

flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 7, 2022
specify serde version compatible with codebase

fix rust-lang#8378

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

3 participants