Implement PaddedSpinLock, which avoids false sharing.#55944
Implement PaddedSpinLock, which avoids false sharing.#55944IanButterworth merged 13 commits intoJuliaLang:masterfrom
PaddedSpinLock, which avoids false sharing.#55944Conversation
Defines a new `AbstractSpinLock` with `SpinLock <: AbstractSpinLock` and `PaddedSpinLock <: AbstractSpinLock`. Fixes 55942.
|
Explanations for the labels, given that this is your first PR: Marking as "needs docs" because the doc string should be included into the documentation document (HTML/PDF). Marking as "needs news" because there's no news entry added, see NEWS.md. |
Co-authored-by: Neven Sajko <s@purelymail.com>
Co-authored-by: Neven Sajko <s@purelymail.com>
|
The doc strings may be included into the built docs by adding the lines for the new types around here: julia/doc/src/base/multi-threading.md Line 66 in bb25910 |
| end | ||
| end | ||
|
|
||
| if threadpoolsize() > 1 |
There was a problem hiding this comment.
AFAIK it's a good idea to wrap new tests into a @testset.
|
Why introduce a new |
|
If you are including the |
The unpadded |
I'm not sure whether that's true.. As I understand it (and I could be wrong) a |
|
Probably want to add a Line 5 in 32ad9e6 |
|
Thanks for the various suggestions and the help with process. |
There was a problem hiding this comment.
a small docs suggestion
remember to add the new type to the online documentation by adding it here:
julia/doc/src/base/multi-threading.md
Line 66 in bb25910
and either mark it public or export it
|
Pending review comments LGTM! |
Co-authored-by: Nick Robinson <npr251@gmail.com>
Co-authored-by: Nick Robinson <npr251@gmail.com>
|
The test failures look real. |
Co-authored-by: adienes <51664769+adienes@users.noreply.github.com>
|
Should this be backported? |
|
no. it's a feature |
Implemented
PaddedSpinLockto help avoid false sharing.Defines a new
AbstractSpinLockwithSpinLock <: AbstractSpinLockandPaddedSpinLock <: AbstractSpinLock.Fixes #55942.