- Notifications
You must be signed in to change notification settings - Fork341
Improve performance and space of async_std::sync::Mutex#370
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes from1 commit
Commits
Show all changes
10 commits Select commitHold shift + click to select a range
1dd0478
Mutex performance benchmarks
nbdd012122f508e
De-bloat `Mutex`es by adding `RawMutex`
nbdd012139ef033
Regain some lost performance due to de-bloating.
nbdd01215427c41
Replace Slab-backed waker list with linked list
nbdd012174186ff
Implement WakerListLock
nbdd012144052b2
Remove the `acquired` bool from RawLockFuture.
nbdd01217a53719
Unlocking the mutex only has to be Release, not AcqRel.
nbdd01217855b90
Retry locking the mutex before touching waker list.
nbdd0121851c225
Transpose the two checks in RawLockFuture::poll
nbdd012143f598d
Move RawLockFuture::poll cold path to #[cold] functions
nbdd0121File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Retry locking the mutex before touching waker list.
Moving the try_lock code to before touching the waker list issound, because the waker list can only ever be accessed with `blocked`hold, so as long as we retry lock it while having `blocked` locked, weare okay.This code also set both LOCK and BLOCKED in the same atomic op. Thishas some performance improvements by touching the atomic variable 1less time when inserting the entry.Signed-off-by: Gary Guo <gary@garyguo.net>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit7855b900c9a9f6a889c32ff91ff6621bc095bd62
There are no files selected for viewing
23 changes: 10 additions & 13 deletionssrc/sync/mutex.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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.