-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SCQ: Add combining arena #2
Labels
Comments
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
ben-manes
added a commit
that referenced
this issue
Apr 9, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Decide on which approaches and implement. The arena should be lazily initialized and grow on contention to reduce the footprint in uncontested usages.
Optimistic w/ combiner mode
Once a producer can combine, it can no longer offer back to the arena on a CAS failure to the queue. The advantage is that no garbage is created as the arena holds only unlinked nodes.
Optimistic with dynamic mode
A producer can pivot between a combiner or transferrer on each failed CAS loop to the queue. A batch insert requires knowing the both the first and last nodes forming a linked list to be appended to the queue. The arena slot must hold both references.
Linearizable
In this mode, a producer that transferred its node must wait it to be added before completing the call. This requires a wrapper with a flag that the waiter spins on and, upon insertion, the combiner sets.
The text was updated successfully, but these errors were encountered: