Samy Al Bahra
68b33e56d8
ck_ring: Add parameterized version of SPMC ring.
12 years ago
Samy Al Bahra
7f35cbee1b
ck_ring: Use SPSC enqueue as SPMC enqueue.
12 years ago
Samy Al Bahra
5d1d850f44
ck_ring: Adopt semantics identical to spmc counter semantics.
12 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.
12 years ago
Samy Al Bahra
d595bafea7
ck_ring: Serialize producer snapshot with respect to consumer.
12 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).
12 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.
12 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.
12 years ago
Samy Al Bahra
957e4aec5d
ck_brlock: Fix typo.
12 years ago
Samy Al Bahra
b631e3aa23
ck_brlock: Enable FAS serialization only on x86.
...
Other architectures, even TSO ones, pay a heavier flush
cost.
12 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.
12 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.
12 years ago
Samy Al Bahra
5df8882840
ck_bytelock: Switch to full semantics on unlock.
...
RW semantics may be used for shared write-side.
12 years ago
Samy Al Bahra
a06f28b77c
ck_ring: Remove useless comment.
12 years ago
Samy Al Bahra
f3111b006b
ck_fifo: SPSC FIFO dequeue only requires load depends barrier.
12 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
Samy Al Bahra
52ca64b2b7
ck_pr/sparcv9: MemIssue is overly heavyweight.
...
Signed-off-by: Samy Al Bahra <sbahra@repnop.org>
13 years ago
Samy Al Bahra
3f217c9789
ck_pr: Fallback to RMO for PSO for this release.
...
Barriers can be rejiggered next release.
13 years ago
Samy Al Bahra
a1dc38f20e
build/ck_pr: Add configurable memory models.
13 years ago
Samy Al Bahra
fedc2f6e47
ck_pr/sparcv9: Assume TSO by default.
13 years ago
Samy Al Bahra
690782aa67
ck_hs: Add hash function wrapper to maintain opacity of ck_hs_t.
...
This is in the form of CK_HS_HASH(X, Y, Z) which expands to
Y(Z, X.seed).
13 years ago
Samy Al Bahra
f2dfd828c3
Merge pull request #7 from abelmathew/master
...
CK_MD_VMA_BITS
13 years ago
Samy Al Bahra
ece2895e9e
ck_hs: Drop ck_hs_hash_t abstraction.
...
No need for opaque type anymore.
13 years ago
Abel Mathew
00d0320767
ck_bag: Fix usage of CK_MD_VMA_BITS.
13 years ago
Samy Al Bahra
adaf20b31c
ck_ht: Add ck_ht_stat function.
...
This can be used to expose certain performance metrics.
13 years ago
Samy Al Bahra
0f5e540afa
ck_hs: Lock-free set loosely modeled after ck_ht.
...
Currently only SPMC, but MPMC transformation is relatively trivial.
Documentation will come in a follow-up commit.
13 years ago
Abel Mathew
ec02b2f356
ck_bag: USE CK_BAG_KEY_LENGTH
13 years ago
Abel Mathew
9ff3c2d017
Merge remote-tracking branch 'upstream/master'
13 years ago
Abel Mathew
981e0a49a2
ck_bag: Use CK_MD_VMA_BITS
13 years ago
Samy Al Bahra
1d1e433dc4
ck_ht: Set unsigned key length.
13 years ago
Samy Al Bahra
ec0d212c04
ck_ht: Set artificial key length limit if pointer packing is disabled.
13 years ago
Samy Al Bahra
90713046e9
ck_ht: Use CK_MD_VMA_BITS.
...
Documentation update is necessary to point out CK_HT_KEY_LENGTH.
13 years ago
Samy Al Bahra
7a04c368ff
build: Add VMA bits detection for Mac OS X and Linux on x86*.
13 years ago
Samy Al Bahra
c45098b21b
ck_epoch: Emit fence instructions for TSO, do not emit for recursive calls.
...
Unfortunately, there are still workloads which will not
serialize. Recursive calls into ck_epoch_begin have no
need for fence instructions.
13 years ago
Samy Al Bahra
a5fb24ab61
ck_ht: Hard-code ck_ht_entry alignment.
...
Even though there is a re-write in progress, this issue must
be fixed. The CK_CC_ALIGNED attribute was never added.
13 years ago
Samy Al Bahra
f6a675ab00
ck_cc: Add no-op macros in case of unsupported compiler.
13 years ago
Samy Al Bahra
57104fcde7
ck_epoch: Change to epoch semantics, bump grace period to 4.
13 years ago
Samy Al Bahra
98d902b024
ck_epoch: Barrier placement for RMO.
13 years ago
Samy Al Bahra
c274e8bc54
ck_epoch: Major redesign and rewrite.
...
I had the pleasure of spending a significant amount of time at the most
recent LPC with Mathieu Desnoyers and Paul McKenney. In discussing
RCU semantics in relation to epoch reclamation, it was argued that
epoch reclamation is a specialisation of RCU (rather than a generalization).
In light of this discussion, I thought it would make more sense to not expose
write-side synchronization semantics aside from ck_epoch_call (similar to
RCU call), ck_epoch_poll (identical to tick), ck_epoch_barrier and
ck_epoch_synchronization (similar to ck_epoch_synchronization). Writers will
now longer have to use write-side epoch sections but can instead rely on
epoch_barrier/synchronization for blocking semantics and ck_epoch_poll
for old tick semantics.
One advantage of this is we can avoid write-side recursion for certain workloads.
Additionally, for infrequent writes, epoch_barrier and epoch_synchronization both
allow for blocking semantics to be used so you don't have to pay the cost of
epoch_entry for non-blocking dispatch.
Example usage:
e = stack_pop(mystack);
ck_epoch_synchronize(...);
free(e);
read_begin and read_end has been replaced with ck_epoch_begin and ck_epoch_end.
If multiple writers need SMR guarantees, then they can also use ck_epoch_begin
and ck_epoch_end. Any dispatch in presence of multiple writers should be done
with-in an epoch section (for now).
There are some follow-up commits to come.
13 years ago
Samy Al Bahra
955047a7d1
ck_{ring,fifo}: Add store fences while we lack load_store fences.
13 years ago
Samy Al Bahra
e78bbe9ae6
ck_{rw,byte,br}lock: Serialize final loads with respect to read.
...
I will switch to a SPARC-style barrier interface.
13 years ago
Samy Al Bahra
1d61147c01
ck_spinlock/mcs: Remove unnecessary fences, serialize unload.
13 years ago
Samy Al Bahra
79e336cfbc
ck_spinlock: Clarify ticket spinlock code.
...
Some people might be confused as far as lack of
fencing in the lock. Add a comment to clarify that
old values should not be equal to new values
of current position (where acquiring the current position
already has a global ordering).
13 years ago
Samy Al Bahra
27ed5f78fe
ck_spinlock: Remove unnecessary fence in DEC-based spinlock.
13 years ago
Samy Al Bahra
a7c4b9df65
ck_spinlock: Adopt RMO for anderson spinlock.
13 years ago
Samy Al Bahra
ce4cdd45c8
ck_spinlock: Adopt RMO semantics for CLH.
13 years ago
Samy Al Bahra
d72ca391f6
ck_bytelock: Switch to RMO model.
13 years ago