-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(threaded): cap LIFO slot polls #5712
Merged
Merged
Commits on May 23, 2023
-
rt(threaded): cap LIFO slot polls
As an optimization to improve locality, the multi-threaded scheduler maintains a single slot (LIFO slot). When a task is scheduled, it goes into the LIFO slot. The scheduler will run tasks in the LIFO slot first, before checking the local queue. In ping-ping style workloads where task A notifies task B, which notifies task A again, this can cause starvation as these two tasks will repeatedly schedule the other in the LIFO slot. #5686, a first attempt at solving this problem, consumes a unit of budget each time a task is scheduled from the LIFO slot. However, at the time of this commit, the scheduler allocates 128 units of budget for each chunk of work. This is quite high in situation where tasks do not perform many async operations, yet have meaningful poll times (even 5-10 microsecond poll times can have outsized impact on the scheduler). In an ideal world, the scheduler would adapt to the workload it is executing. However, as a stopgap, this commit limits the number of times the LIFO slot is prioritized per scheduler tick.
Configuration menu - View commit details
-
Copy full SHA for 8b60f58 - Browse repository at this point
Copy the full SHA 8b60f58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ff6296 - Browse repository at this point
Copy the full SHA 4ff6296View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c05de8 - Browse repository at this point
Copy the full SHA 0c05de8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7722aee - Browse repository at this point
Copy the full SHA 7722aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for b6d37ea - Browse repository at this point
Copy the full SHA b6d37eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61dbf13 - Browse repository at this point
Copy the full SHA 61dbf13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91e849f - Browse repository at this point
Copy the full SHA 91e849fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 57d550a - Browse repository at this point
Copy the full SHA 57d550aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cc3716 - Browse repository at this point
Copy the full SHA 5cc3716View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4ae2f8 - Browse repository at this point
Copy the full SHA e4ae2f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7701edc - Browse repository at this point
Copy the full SHA 7701edcView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.