-
Notifications
You must be signed in to change notification settings - Fork 111
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
Overhaul internals to support faster execution #111
Conversation
The internals are overhauled to avoid as much allocation as possible. This is done by leveraging the object store as much as possible and hard coding settings such as max threads. Additionally, the history tracked by atomic cells is limited. These changes enable tracking state without the use of vecs and other allocated collections. The "backtrace" feature is removed in favor of the nightly `Location` API. To enable this, a nightly Rust must be used and `--cfg loom_nightly` specified at compile time. This patch comes with a number of breaking changes, including: * `CausalCell` deferred checks is removed as doing so is undefined behavior. * `CausalCell` is renamed to `UnsafeCell`.
@hawkw This should be ready to review / merge. |
Running this command against the Tokio repo:
Master: 631,933 iterations
This PR: 231,145 iterations
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new location tracking is very cool, and I'm excited to get to use it! Bounding the history and using stack arrays seems like a great, simple way to improve loom performance. I'd like to take a closer look at the changes to causality rules, but I've left a few minor comments for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks really great --- and i appreciate the number of comments in the new code, made reviewing much easier. i left a few more minor comments.
Co-Authored-By: Eliza Weisman <eliza@buoyant.io>
Co-Authored-By: Eliza Weisman <eliza@buoyant.io>
Co-Authored-By: Eliza Weisman <eliza@buoyant.io>
Co-Authored-By: Eliza Weisman <eliza@buoyant.io>
The internals are overhauled to avoid as much allocation as possible.
This is done by leveraging the object store as much as possible and hard
coding settings such as max threads. Additionally, the history tracked
by atomic cells is limited. These changes enable tracking state without
the use of vecs and other allocated collections.
The "backtrace" feature is removed in favor of the nightly
Location
API. To enable this, a nightly Rust must be used and
--cfg loom_nightly
specified at compile time.This patch comes with a number of breaking changes, including:
CausalCell
deferred checks is removed as doing so is undefinedbehavior.
CausalCell
is renamed toUnsafeCell
.