Brendon Scheinman
dbe49215ac
testing: Added validation test for cohorts.
12 years ago
Brendon Scheinman
6cf5cc46b3
Removed (what I think is) an unnecessary memory fence
12 years ago
Brendon Scheinman
9fe741ea12
added acquire count logic and some comments
12 years ago
Brendon Scheinman
3581a01fdf
Initial attempt at cohort logic (still untested)
12 years ago
Joao Fernandes
086ebf7126
ck_pr: moving PPC32 to RMO.
...
Signed-off-by: Joao Fernandes <mail@joaofernandes.eu>
12 years ago
Samy Al Bahra
8c53de1e70
ck_rwlock: Add documentation on visibility semantics.
12 years ago
Samy Al Bahra
1ea5769fd4
ck_rwlock: Improve code legibility.
12 years ago
Samy Al Bahra
334b15e6e0
ck_bytelock: Acquire semantics on read.
12 years ago
Samy Al Bahra
038b3d816d
ck_rwlock: Forgot to add acquire on operation success.
12 years ago
Samy Al Bahra
0598307186
whitespace: Various style changes.
12 years ago
Abel Mathew
25658c4f5f
ck_queue: Fix CK_LIST_INSERT_HEAD.
...
CK_LIST_INSERT_HEAD was incorrectly managing prev
pointer on insertion to non-empty list. This bug
would cause erroneous behavior on CK_LIST_REMOVE
to non-head elements. Unit test will be updated
for this regression.
12 years ago
Samy Al Bahra
33a9222923
legal: Update Copyright statements.
12 years ago
Samy Al Bahra
d29ac5afdb
ck_bytelock: Fix downgrade path from writer to reader.
...
An off-by-one was introduced in downgrade path from writer.
This can cause deadlock if a writer downgrades from a write lock.
Pointed out by Jeffrey Birnbaum <jmb...@...>.
12 years ago
Samy Al Bahra
c4149c72b4
ck_ring: Use regular assignment in type specialized ck_ring initialization.
13 years ago
Samy Al Bahra
89cb712ffa
ck_ring: Memoize mask across all operations.
13 years ago
Samy Al Bahra
8519aaf771
ck_ring: Memoize mask for SPMC operations.
13 years ago
Samy Al Bahra
b54ae5c4ac
ck_ring: Add a work-around for compiler bug(s) in ck_ring_dequeue_spmc.
...
Both LLVM-backed compilers and GCC incorrectly treat
a barrier-sandwiched load as a loop invariant in dequeue_spmc.
Forcing volatile atomic load semantics generates the right
thing.
Thanks to Devon O'Dell and Abel Mathew for help in catching
this issue.
13 years ago
Samy Al Bahra
0631e396e0
ck_backoff: Replace ck_backoff_eb with ck_backoff_gb.
...
The distinction between additive/exponential implementation
and geometric implementation does little but confuse users.
The terminology used in ck_backoff now reflects terminology
used in literature.
ck_backoff_gb has been removed.
13 years ago
Samy Al Bahra
b37ce19976
ck_pr/x86_64: GCC will attempt immediate expansion on double.
...
Break out double functionality to not use immediate expansion
at all.
Pointed out by Abel Mathew <amathew@appnexus...>.
13 years ago
Samy Al Bahra
0c56b1b8c6
ck_epoch: Remember to mark entry availability on unregister.
...
Pointed out by Matt Johnson (johnso87@crhc....>.
13 years ago
Samy Al Bahra
93684f77c1
ck_pr: Use CK_CC_INLINE instead of inline keyword for ck_pr_barrier.
13 years ago
Samy Al Bahra
de0597d2aa
ck_bitmap: Add comment for ck_bitmap_size.
13 years ago
Samy Al Bahra
849f938973
ck_ring: Add parameterized version of ck_ring_trydequeue.
13 years ago
Samy Al Bahra
7a99585f9e
ck_ring: No need for volatile load on dequeue_spmc.
13 years ago
Samy Al Bahra
01dc51db65
ck_ring: Add trydequeue variant.
13 years ago
Samy Al Bahra
ca8be0858c
ck_pr: Re-include port selection logic.
13 years ago
Samy Al Bahra
1c7b8811c8
ck_pr/gcc: Remove useless assignment from volatile load.
13 years ago
Samy Al Bahra
a9ed19303f
ck_pr/gcc: Adopt const semantics for load/store in GCC port.
13 years ago
Samy Al Bahra
6de54d6aa5
ck_pr/x86_64: Use correct target for load_64_2.
13 years ago
Samy Al Bahra
12da4128ff
ck_pr: Adopt const qualifer for load/store.
...
We will adopt these semantics for the rest of _ptr
family at some point in the future as well.
13 years ago
Samy Al Bahra
055a7fd5db
ck_ring: Add wrapper functions for parameterized SPMC ring.
13 years ago
Samy Al Bahra
68b33e56d8
ck_ring: Add parameterized version of SPMC ring.
13 years ago
Samy Al Bahra
7f35cbee1b
ck_ring: Use SPSC enqueue as SPMC enqueue.
13 years ago
Samy Al Bahra
5d1d850f44
ck_ring: Adopt semantics identical to spmc counter semantics.
13 years ago
Samy Al Bahra
77a3bd3126
ck_ring: Move overflow check to producer side.
...
unsigned int-sized counters will be used on producer
and consumer side. This is necessary to allow a ring
to be used on multiple workloads.
13 years ago
Samy Al Bahra
d595bafea7
ck_ring: Serialize producer snapshot with respect to consumer.
13 years ago
Samy Al Bahra
d705e02b76
ck_ring: Replace MPMC variant with SPMC variant for starters.
...
Immediate use-case is SPMC. Next is MPSC, then I will generalize
to MPMC (unfortunately, I don't have an algorithm that avoids CAS2
yet for MPMC).
13 years ago
Samy Al Bahra
bb48f602ff
ck_ring: Add note regarding correctness so people don't both verifying it.
...
Original version is susceptible to several problems, it is whack.
13 years ago
Samy Al Bahra
68e6752e53
ck_ring: Due to popular request, add MPMC variants of enqueue/dequeue.
...
Fencing semantics are heavier-weight than they need to be.
13 years ago
Samy Al Bahra
957e4aec5d
ck_brlock: Fix typo.
13 years ago
Samy Al Bahra
b631e3aa23
ck_brlock: Enable FAS serialization only on x86.
...
Other architectures, even TSO ones, pay a heavier flush
cost.
13 years ago
Samy Al Bahra
2bdc231288
ck_brlock: Serialize on atomic operation on read acquisition.
...
10% improvement for reader acquisition latency on TSO architectures
implementing wait-free FAS.
13 years ago
Samy Al Bahra
cb1c72d36b
ck_queue: Add CK_?LIST_MOVE operation.
...
This operation is of format:
CK_S*LIST_MOVE(a, b, linkage) and is equivalent to intializing
a with the contents of b. This is done in a manner that is atomic
with respect to readers. Read-only operations are still valid in
b, but behavior is undefined for write-side operations on b after
a MOVE operation.
13 years ago
Samy Al Bahra
5df8882840
ck_bytelock: Switch to full semantics on unlock.
...
RW semantics may be used for shared write-side.
13 years ago
Samy Al Bahra
a06f28b77c
ck_ring: Remove useless comment.
13 years ago
Samy Al Bahra
f3111b006b
ck_fifo: SPSC FIFO dequeue only requires load depends barrier.
13 years ago
Samy Al Bahra
bf30d3439c
ck_rwlock: Remove unncessary load fences, switch to full semantics on read unlock.
...
rwlock may also be used in SPMC workloads.
13 years ago
Samy Al Bahra
65ebf86799
ck_spinlock: Switch to full semantics across all implementations.
...
More importantly, trylock previously didn't have full semantics.
13 years ago
Samy Al Bahra
e40521d1aa
ck_pr/ppc64: Switch to RMO model for atomic operations.
...
Signed-off-by: Samy Al Bahra <sbahra@repnop.org>
13 years ago
Samy Al Bahra
6be03bb450
ck_bytelock: Remove unnecessary load barrier on unslotted read acquisition.
...
Signed-off-by: Samy Al Bahra <sbahra@repnop.org>
13 years ago