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

Make Local less than 2048 bytes #552

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Make Local less than 2048 bytes #552

merged 1 commit into from
Sep 1, 2020

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Sep 1, 2020

Set MAX_OBJECTS to 62, and make the size of Local to 2040 bytes.

Closes #551

@@ -55,7 +55,7 @@ use crate::sync::queue::Queue;

/// Maximum number of objects a bag can contain.
#[cfg(not(feature = "sanitize"))]
const MAX_OBJECTS: usize = 64;
const MAX_OBJECTS: usize = 62;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, if make Local to be less than or equal to 1024 bytes, MAX_OBJECTS needs to be 30 (1016 bytes)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I didn't misunderstand @stjepang's this comment, It seems fine with less than half of what it is now, so it may be okay with this.

@taiki-e taiki-e requested a review from a user September 1, 2020 08:43
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@taiki-e
Copy link
Member Author

taiki-e commented Sep 1, 2020

bors r=stjepang

@bors
Copy link
Contributor

bors bot commented Sep 1, 2020

Build succeeded:

@bors bors bot merged commit ce53365 into master Sep 1, 2020
@taiki-e taiki-e deleted the local-size branch September 1, 2020 14:05
exrook pushed a commit to exrook/crossbeam that referenced this pull request Oct 7, 2020
This is just one of a few things to try related to crossbeam-rs#552. As a first step it
would be interesting to see what kind of impact this has on Firefox automation
builds. Some initial measurements are promising for builds with lots of cache
misses, but this sort of thing is cumbersome to measure, so I'd like to try
enabling this for the sccache client built in Mozilla automation to see the
impact it has there.
HackerFoo added a commit to HackerFoo/crossbeam that referenced this pull request Jul 16, 2022
This reverts commit ce53365, reversing
changes made to bfb7705.
HackerFoo added a commit to HackerFoo/crossbeam that referenced this pull request Jul 16, 2022
This reverts commit ce53365, reversing
changes made to bfb7705.
bors bot added a commit that referenced this pull request Jul 22, 2022
879: epoch: Adjust MAX_OBJECTS r=taiki-e a=taiki-e

- Revert #552 to mitigate the risk of segmentation faults in buggy downstream implementations (see #869)
- Reduce MAX_OBJECTS on cfg(miri)

Co-authored-by: Taiki Endo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

The Local structure is 2104 bytes long and jemalloc rounds this to 4096 bytes.
1 participant