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

cordyceps: intrusive transfer stack #137

Closed
hawkw opened this issue Feb 19, 2022 · 0 comments · Fixed by #434
Closed

cordyceps: intrusive transfer stack #137

hawkw opened this issue Feb 19, 2022 · 0 comments · Fixed by #434
Labels
crate/cordyceps Related to the `cordyceps` crate kind/enhancement New feature or request

Comments

@hawkw
Copy link
Owner

hawkw commented Feb 19, 2022

"transfer stack" is a Carl-ism for a Treiber stack variant where the consumer pops the whole stack in one go.

we don't need this for anything in particular right now, but it's cute and easy to write.

@hawkw hawkw added crate/cordyceps Related to the `cordyceps` crate kind/enhancement New feature or request labels Jul 26, 2022
hawkw added a commit that referenced this issue May 10, 2023
This branch adds an implementation of a singly-linked mutable FIFO
`Stack`and a singly-linked lock-free FIFO `TransferStack` in
`cordyceps::stack`.

A `Stack` is just your traditional FIFO stack structure.
`TransferStack` is a bit more interesting --- it's a simplification of
the traditional lock-free Treiber stack wher all elements are popped
into a new mutable `Stack` in a single atomic operation. This avoids the
ABA problem issues common with naive Treiber stack implementations. It's
intended primarily for use in a `mimalloc`-style sharded per-core memory
allocator.

Closes #137

Signed-off-by: Eliza Weisman <eliza@elizaswebsite>
hawkw added a commit that referenced this issue May 12, 2023
This branch adds an implementation of a singly-linked mutable FIFO
`Stack`and a singly-linked lock-free FIFO `TransferStack` in
`cordyceps::stack`.

A `Stack` is just your traditional FIFO stack structure.
`TransferStack` is a bit more interesting --- it's a simplification of
the traditional lock-free Treiber stack wher all elements are popped
into a new mutable `Stack` in a single atomic operation. This avoids the
ABA problem issues common with naive Treiber stack implementations. It's
intended primarily for use in a `mimalloc`-style sharded per-core memory
allocator.

Closes #137

Signed-off-by: Eliza Weisman <eliza@elizaswebsite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/cordyceps Related to the `cordyceps` crate kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant