Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Relax the memory ordering on the implementation of UnsafeArc #12962

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

gereeter commented Mar 17, 2014

The implementation of UnsafeArc was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.

Owner

alexcrichton commented Mar 17, 2014

I'm comfortable with the sources that you've cited, even if I'm not personally comfortable enough with the atomics themselves. Thanks for this!

Contributor

bors replied Mar 17, 2014

saw approval from alexcrichton
at gereeter/rust@c18fea5

Contributor

bors replied Mar 17, 2014

merging gereeter/rust/relaxed-arc = c18fea5 into auto

Contributor

bors replied Mar 17, 2014

gereeter/rust/relaxed-arc = c18fea5 merged ok, testing candidate = bfd8085

Contributor

bors replied Mar 18, 2014

saw approval from alexcrichton
at gereeter/rust@c18fea5

Contributor

bors replied Mar 18, 2014

merging gereeter/rust/relaxed-arc = c18fea5 into auto

Contributor

bors replied Mar 18, 2014

gereeter/rust/relaxed-arc = c18fea5 merged ok, testing candidate = a81d7fb

Contributor

bors replied Mar 18, 2014

saw approval from alexcrichton
at gereeter/rust@c18fea5

Contributor

bors replied Mar 18, 2014

merging gereeter/rust/relaxed-arc = c18fea5 into auto

Contributor

bors replied Mar 18, 2014

gereeter/rust/relaxed-arc = c18fea5 merged ok, testing candidate = 95c4d47

Contributor

bors replied Mar 18, 2014

saw approval from alexcrichton
at gereeter/rust@c18fea5

Contributor

bors replied Mar 18, 2014

merging gereeter/rust/relaxed-arc = c18fea5 into auto

Contributor

bors replied Mar 18, 2014

gereeter/rust/relaxed-arc = c18fea5 merged ok, testing candidate = 52ba3b1

@bors: retry

Contributor

bors replied Mar 18, 2014

saw approval from alexcrichton
at gereeter/rust@c18fea5

Contributor

bors replied Mar 18, 2014

merging gereeter/rust/relaxed-arc = c18fea5 into auto

Contributor

bors replied Mar 18, 2014

gereeter/rust/relaxed-arc = c18fea5 merged ok, testing candidate = 14364ce

@bors: retry

@bors bors added a commit that referenced this pull request Mar 17, 2014

@bors bors auto merge of #12962 : gereeter/rust/relaxed-arc, r=alexcrichton
The implementation of `UnsafeArc` was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.
bfd8085

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #12962 : gereeter/rust/relaxed-arc, r=alexcrichton
The implementation of `UnsafeArc` was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.
a81d7fb

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #12962 : gereeter/rust/relaxed-arc, r=alexcrichton
The implementation of `UnsafeArc` was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.
95c4d47

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #12962 : gereeter/rust/relaxed-arc, r=alexcrichton
The implementation of `UnsafeArc` was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.
52ba3b1

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #12962 : gereeter/rust/relaxed-arc, r=alexcrichton
The implementation of `UnsafeArc` was unnecessarily using stricter memory ordering than it needed to, producing worse performance in high contention.

I'm not exactly sure how to test or benchmark this change, as it should only show up rarely on a weakly ordered CPU while in contention.
14364ce

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
6ca126b

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
9d63857

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
8b89e22

@bors bors added a commit that referenced this pull request Mar 18, 2014

@bors bors auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13008 (Made the `clone_from` implementation for `~T` reuse the `T` itself if possible)
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
f219746

@bors bors added a commit that referenced this pull request Mar 19, 2014

@bors bors auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13008 (Made the `clone_from` implementation for `~T` reuse the `T` itself if possible)
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
8cc005f

@bors bors closed this in 87e72c3 Mar 19, 2014

@gereeter gereeter deleted the gereeter:relaxed-arc branch Dec 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment