Samy Al Bahra
a1daff18ea
ck_swlock: Switch to TATAS style loop for latch operations.
11 years ago
Samy Al Bahra
82f33b3fe9
ck_swlock: First round fixes for ck_swlock.
...
- Add necessary memory barriers.
- Style conformance.
11 years ago
Jaidev Sridhar
9732e2bdb3
ck_swlock: A single writer rwlock.
...
This lock is copy-safe when the latch operations are used.
Simplified write side operations lead to lower latencies than ck_rwlock
for single writer workloads.
11 years ago
Samy Al Bahra
176dfce5c3
ck_rwlock: Fix conflict.
...
ck_swlock will be a copy-safe single-writer multi-reader lock that
will meet our requirements.
11 years ago
Samy Al Bahra
e2913ab9c0
Revert "ck_rwlock: Migrate to 32-bit primitives and add a write_latch operation."
...
This reverts commit 210b724061
.
Conflicts:
include/ck_rwlock.h
11 years ago
Samy Al Bahra
6ccfb84d81
Revert "ck_rwlock: Use sub for unlatch operation."
...
This reverts commit b7c3c8a43d
.
11 years ago
Samy Al Bahra
ed476a617c
Revert "ck_rwlock: Clear reader bits on unlatch operation."
...
This reverts commit 7f945460bc
.
11 years ago
Samy Al Bahra
cdfac8213f
Revert "ck_rwlock: Re-observe latch bits if necessary."
...
This reverts commit fa28622386
.
11 years ago
Samy Al Bahra
88d323f40d
Revert "ck_rwlock: Acquire semantics for ordering on latch bits."
...
This reverts commit 2b567320de
.
11 years ago
Samy Al Bahra
9ebd19a124
Revert "ck_rwlock: Add ck_rwlock_read_latchlock operation."
...
This reverts commit bc7ebc62eb
.
11 years ago
Samy Al Bahra
cf097db790
Revert "ck_rwlock: Ignore latch bits on write lock operation."
...
This reverts commit 8173b937bf
.
11 years ago
Samy Al Bahra
e2bd885953
Revert "ck_rwlock: Re-organization of write-side operations and latch support for write_trylock."
...
This reverts commit ab22fda4e7
.
11 years ago
Samy Al Bahra
9aad0125af
Revert "ck_rwlock: Additional re-organization of write-side functions."
...
This reverts commit d9b86d2d89
.
11 years ago
Samy Al Bahra
d3a7adaf8c
Revert "ck_rwlock: Additional reorganization."
...
This reverts commit 56de32fffd
.
11 years ago
Samy Al Bahra
2a701163eb
ck_rwlock: Ditch ck_rwlock latch for ck_swlock.
11 years ago
Samy Al Bahra
56de32fffd
ck_rwlock: Additional reorganization.
11 years ago
Samy Al Bahra
d9b86d2d89
ck_rwlock: Additional re-organization of write-side functions.
11 years ago
Samy Al Bahra
ab22fda4e7
ck_rwlock: Re-organization of write-side operations and latch support for write_trylock.
11 years ago
Samy Al Bahra
8173b937bf
ck_rwlock: Ignore latch bits on write lock operation.
11 years ago
Samy Al Bahra
bc7ebc62eb
ck_rwlock: Add ck_rwlock_read_latchlock operation.
...
This avoids degradation on read_lock path for use-cases not
requiring latch semantics.
11 years ago
Samy Al Bahra
2b567320de
ck_rwlock: Acquire semantics for ordering on latch bits.
11 years ago
Samy Al Bahra
fa28622386
ck_rwlock: Re-observe latch bits if necessary.
11 years ago
Samy Al Bahra
7f945460bc
ck_rwlock: Clear reader bits on unlatch operation.
11 years ago
Samy Al Bahra
b7c3c8a43d
ck_rwlock: Use sub for unlatch operation.
11 years ago
Samy Al Bahra
3cae483bce
Merge branch 'master' of git.concurrencykit.org:ck
11 years ago
Samy Al Bahra
210b724061
ck_rwlock: Migrate to 32-bit primitives and add a write_latch operation.
...
write_latch allows writers to prevent incoming read acquisitions from
succeeding while permitting write_lock operations to complete. This is
useful if multiple writers are cooperating in linearizing a non-blocking
data structure and allows for lock state to be copied by the write lock
holder safely.
In collaboration with Paul Khuong and Jaidev Sridhar.
11 years ago
Samy Al Bahra
f8b41af77c
x86_64: Require 32-bit immediate values for expansion.
...
Pointed out by Paul Khuong, who ran into issues with immediates
while working on improvements to ck_bitmap.
11 years ago
Samy Al Bahra
cefd6bc9ec
ck_ring: Remove stale comment from pre-memcpy implementation.
11 years ago
Samy Al Bahra
396ceb16bb
ck_ring: Fix typo in type-specialized ck_ring_dequeue_tryspmc.
...
Thanks to Paul Khuong <pkhuong@appnexus> for patch.
11 years ago
Samy Al Bahra
6e0f79c70e
ck_tflock: Initial check-in of reference implementation.
11 years ago
Samy Al Bahra
671d067ea0
ck_bytelock: Fix casting error affecting 32-bit architectures.
11 years ago
Samy Al Bahra
81f267ce62
Merge branch 'master' of git.concurrencykit.org:ck
11 years ago
Samy Al Bahra
b97b0021f9
ck_barrier: Just pass-through tournament barrier with only one participating thread.
11 years ago
Samy Al Bahra
15ce0501d2
ck_sequence: Add branch hint for short-circuit.
11 years ago
Samy Al Bahra
cb8f5f9ebb
ck_hp_fifo: Add deinit routine to allow reclaiming stub node.
11 years ago
Samy Al Bahra
c75e470ed4
ck_fifo_spsc: De-initialize from head.
11 years ago
Samy Al Bahra
06feae82f3
ck_hp_fifo: No need for volatile atomic stores on initialization.
11 years ago
Samy Al Bahra
5ec8191ded
ck_fifo: Add ck_fifo_*_deinit routines.
...
These allow for reclamation of garbage node in an empty FIFO.
Based on patch submitted by Rajesh R <rr01803@gm....>.
11 years ago
Samy Al Bahra
15ac0bc691
ck_bitmap: Fix length calculation error in ck_bitmap_union (crasher).
11 years ago
Samy Al Bahra
08be876fa6
ck_bytelock: Correctly compute byte sequence length for readers.
...
Thanks to Albi Kavo <albi.kavo@gm...> for spotting this.
11 years ago
Samy Al Bahra
190b204059
ck_bitmap: Drop _mpmc suffix and add union operation.
...
The _mpmc suffix is not useful. I see little benefit to specializing
the bitmap to begin with.
11 years ago
Samy Al Bahra
76e43825a7
Merge remote-tracking branch 'origin/cognet'
11 years ago
Samy Al Bahra
b8c801136a
ck_bytelock: Fix deadlock for unslotted reader workloads.
...
There is an off-by-one for slot ID sizeof(bytelock->readers) + 1.
This patch fixes the handling of this slot ID. Based off a patch
submitted by Albi Kavo <albi.kavo@gma....>.
11 years ago
User Doginou
59cedf10c6
ck_rhs: Add a read mostly mode.
...
Add a read-mostly mode, in which entries won't share cache lines with
associated datas (probes, probe_bound, etc).
This makes write operations slower, but make get faster.
11 years ago
Olivier Houchard
bf686c0a42
ck_rhs: Add.
...
Introduce ck_rhs, a variant of ck_hs that uses the robin hood algorithm for
insertion, and backward shift delete for deletion.
11 years ago
Samy Al Bahra
c197b37df1
legal: Update Copyright statements.
11 years ago
Samy Al Bahra
0c4ed1d14f
ck_pflock: Use store barrier on init.
11 years ago
Samy Al Bahra
0353cdcb23
ck_rwlock: Migrate to acquire / release and other barrier improvements.
11 years ago
Samy Al Bahra
38c40315a2
ck_brlock: Use store barrier on initialization.
11 years ago
Samy Al Bahra
ac8397d8b5
ck_rwcohort: Migrate to acquire / release.
11 years ago
Samy Al Bahra
5280253974
ck_pflock: Use precise barrier in read_unlock.
11 years ago
Samy Al Bahra
febdb8c164
ck_brlock: Use precise barrier for read_unlock.
11 years ago
Samy Al Bahra
0c205740aa
ck_pflock: Migrate to acquire / release.
11 years ago
Samy Al Bahra
ad5e00cfb9
ck_epoch: Read-side latency improvements on x86.
11 years ago
Samy Al Bahra
cad7b53273
ck_epoch: Migrate to acquire / release.
11 years ago
Samy Al Bahra
e8051b79c2
ck_elide: Add comment indicating purposeful omission of barriers.
11 years ago
Samy Al Bahra
16f7568e5c
ck_cohort: Migrate to acquire / release.
11 years ago
Samy Al Bahra
44689f7e69
ck_bytelock: Migrate to acquire / release.
11 years ago
Samy Al Bahra
f314b52035
ck_brlock: Migrate to acquire/release.
11 years ago
Samy Al Bahra
0bbb6f0eff
ck_pr: Fix typo in preprocessor usage.
11 years ago
Samy Al Bahra
e57bfd5865
spinlock: Migrate to acquire / release interface.
11 years ago
Samy Al Bahra
661f3948ed
ck_pr: Add acquire and release fences.
11 years ago
Samy Al Bahra
057f719796
ck_ring: Add type-specialized ring.
11 years ago
Samy Al Bahra
90c9950356
ck_ring: Type-agnostic backend implementation.
...
This will serve to drive both pointer-based and type-specialized ring
implementations. Some full fences have also been removed as they are
unnecessary with the introduction of X_Y fence interface.
11 years ago
Samy Al Bahra
4af7571990
ck_pr/arm: Remove extraneous newline.
11 years ago
Olivier Houchard
259fb5174d
ck_pr: Use the "dmb st" instruction on arm when available.
11 years ago
Samy Al Bahra
b32e1b24df
ck_spinlock: Use more finely-grained barrier for CLH.
11 years ago
Samy Al Bahra
eb59f6ead5
ck_ht: Add CK_HT_WORKLOAD_DELETE flag.
...
This is a port of the hash set delete workload
hint.
11 years ago
Olivier Houchard
b17706f967
hclh: Assert my copyright.
11 years ago
Samy Al Bahra
df571ad331
ck_spinlock: Migrate lock implementations to directory.
11 years ago
Samy Al Bahra
1ecb37b28f
Merge branch 'cognet' of git.concurrencykit.org:ck
11 years ago
Samy Al Bahra
b6a1914085
ck_ring: Prefer treatment of ck_ring_buffer_t as an opaque type.
11 years ago
Samy Al Bahra
b6f085a62e
ck_ring: Minor style change.
11 years ago
Samy Al Bahra
e6c0ef01a5
ck_spinlock: Revert previous change, do not splice too early.
11 years ago
Samy Al Bahra
e8b26ec212
ck_spinlock: Minor readability changes to ck_hclh.
11 years ago
Samy Al Bahra
c219593967
ck_spinlock: First round of improvements to ck_hclh.
...
* Drop unnecessary volatile stores.
* Use more expressive ck_pr_fence_X_Y semantics.
11 years ago
Samy Al Bahra
0e5ce1aae7
ck_spinlock: Simple whitespace changes (wrap long lines).
11 years ago
Olivier Houchard
0f92cbab08
ck_spinlock: Commit the missing HCLH bits.
11 years ago
Samy Al Bahra
aa0c303554
ck_ht: Add ck_ht_gc functionality, similar to ck_hs_gc.
...
This allows for incremental reprobe to shorten over-all probe sequences
in delete heavy workloads.
11 years ago
Olivier Houchard
3edb523da5
ck_ring: Move the ring buffer outside of the ck_ring_t
...
Remove the ring buffer from the struct ck_ring, it is now required to
explicitely pass the ring buffer for enqueue/dequeue. That can be useful for
systems with multiple address spaces.
11 years ago
Samy Al Bahra
b778a32b0e
Merge branch 'master' of git.concurrencykit.org:ck
11 years ago
Samy Al Bahra
0d6a0508cc
ck_hs: Allow for amortization and partial rebuild in ck_hs_gc.
11 years ago
Samy Al Bahra
f7eff4d61b
ck_hs: Add ck_hs_gc, mechanism for tombstone clean-up.
...
This is treated as an explicit garbage collection step
which will block writers.
11 years ago
Samy Al Bahra
5d4f9ae23d
ck_hs: Add ck_hs_rebuild operation.
...
This operation is short-hand notation for rebuilding
a hash table. This rebuild can occur in the presence
of concurrent readers and will require twice the amount
of memory of the existing hash table until completion.
11 years ago
Samy Al Bahra
2ad920cd85
ck_hs: Add improved support for delete-heavy workloads.
...
This borrows from a technique described by Purcell and Harris
in "Non-blocking hashtables with open addressing" technical report.
Essentially, every slot will have an associated local probe maxim,
including tombstones. Highly aggressive workloads may still require
occassional garbage collection.
11 years ago
Samy Al Bahra
30d956d682
ck_hs: Re-order includes in header file.
11 years ago
Samy Al Bahra
a3532d52ce
ck_hs: Add ck_hs_put_unique function for fast-path unique inserts.
...
This function allows for faster insertions into tombstone-heavy
probe sequences by short-circuiting on tombstones rather than
continuing to probe. The user must already guarantee that the
entry being inserted is unique. If a non-unique key is inserted
with this operation, undefined behavior will result.
11 years ago
Samy Al Bahra
0610a0d0a8
ck_bag: Drop support for this data structure.
...
Could not find suitable use-case and generally doesn't
appear interesting to academics in the existing
form. Maybe it will make a come-back in the future with
fewer memory and latency compromises.
11 years ago
Samy Al Bahra
3c089d55e5
arm: Add support for cas_2 and other double-word operations.
...
This adds support for CAS_64{_VALUE}, CAS_PTR_2{_VALUE},
LOAD_64, STORE_64 and other primitives built on universal
CAS primitive.
Patch submitted by Olivier Houchard <cognet@FreeBSD>.
11 years ago
Samy Al Bahra
b801ec4b98
ck_array: Remove variable name from ck_array_init declaration.
11 years ago
Samy Al Bahra
a7cb0f9bbb
ck_array: Add ck_array_initialized functionality.
...
The function returns true if the target is initialized, otherwise,
it returns false.
11 years ago
Samy Al Bahra
2db9de633f
ck_array: Simple eliminating SPMC dense array for fast iteration.
...
The array is optimized for SPMC and fast iteration (though MPMC
transformation is also possible). This is an extremely simple
implementation with support for atomic in-place modification
through put -> remove elimination.
11 years ago
Samy Al Bahra
5916485e9e
ck_pr/arm: Implement support for Thumb 2 and fix incorrect CAS behavior.
...
Besides implementing Thumb 2 supports, this fixes incorrect usage of
"cmp" where "cmpeq" was meant.
Patch submitted by Olivier Houchard <cognet@freebsd>.
11 years ago
Samy Al Bahra
e1c0f6854d
ck_pr/arm: Additional style clean-up.
11 years ago
Samy Al Bahra
1c97766039
ck_pr: First cut 32-bit ARM port.
...
Contributed by Olivier Houchard <cognet@freebsd>.
Signed-off-by: Samy Al Bahra <sbahra@repnop.org>
11 years ago
Samy Al Bahra
1cc189b08e
ck_bitmap: Remove unused argument for CK_BITMAP_BITS.
...
This is an API change, has been on the queue for a while.
Patch submitted by Shreyas Prasad <sprasad@appnexus>.
11 years ago
Samy Al Bahra
5d8a273dbe
whitespace: Bulk whitespace changes.
11 years ago
Samy Al Bahra
3e5dcfe6fd
ck_sequence: Add CK_SEQUENCE_READ operation.
12 years ago
Samy Al Bahra
2d4524dd3e
ck_spinlock: Retab (whitespace).
...
Accidentally had Haskell vim modeline set.
12 years ago
Samy Al Bahra
07aab518f6
ck_spinlock: Retab (whitespace).
12 years ago