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

rt: unnecessary calls to unpark I/O driver #5207

Open
carllerche opened this issue Nov 18, 2022 · 0 comments
Open

rt: unnecessary calls to unpark I/O driver #5207

carllerche opened this issue Nov 18, 2022 · 0 comments
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-runtime Module: tokio/runtime

Comments

@carllerche
Copy link
Member

I'm filing this as a runtime issue though the symptom is invocations to the I/O driver unpark method.

I have identified unnecessary calls to the time driver's unpark() method, which translates to calls to the I/O driver waker. The calls are unnecessary due to the I/O driver not currently being parked. Each call driver unpark call is relatively expensive.

Each time::sleep() will potentially unpark the time driver. This is so that if the driver is parked, it can observe the new timeout. This unpark always happens even when using the current-thread runtime. The unpark is unnecessary because the I/O driver is not currently parked.

@carllerche carllerche added C-bug Category: This is a bug. A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-runtime Module: tokio/runtime
Projects
None yet
Development

No branches or pull requests

1 participant