Samy Al Bahra
de9220ce16
ck_array: Change semantics of put_unique return values.
...
More specifically, -1 should idiomatically indicate error.
11 years ago
Samy Al Bahra
493360636b
ck_array: Additional regressions coverage and code clean-up.
11 years ago
Samy Al Bahra
ef15380a62
regressions/ck_hs: Increase coverage across multiple start sizes.
11 years ago
Samy Al Bahra
7a49725b7f
ck_array: Fix use-after-free on transactional put.
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
1898a8e450
regressions: Coverage for CK_SEQUENCE_READ.
12 years ago
Samy Al Bahra
61d5beff46
regressions: Use correct hash value for blob!
12 years ago
Samy Al Bahra
077ca3ab00
regressions: Increase coverage of ck_hs_move.
...
Iteration count increased, duplicate logic fixed.
12 years ago
Samy Al Bahra
120a262f18
ck_hs: Test coverage for ck_hs_move.
12 years ago
Samy Al Bahra
721cc0605c
regressions: Remove -g from ck_rwcohort build flags.
12 years ago
Samy Al Bahra
895ff34aab
regressions: Add ck_rwcohort to top-level Makefile.
12 years ago
Samy Al Bahra
b36e35ec76
Merge branch 'master' of https://github.com/bscheinman/ck
12 years ago
Samy Al Bahra
768b5b3597
ck_rwlock: Add adaptive elision and unit tests.
12 years ago
Samy Al Bahra
ac4a703525
regressions: Get rid of debug flags in ck_rwlock benchmark.
12 years ago
Samy Al Bahra
671f82d7a8
ck_rwlock: Migrate to ck_elide.h.
12 years ago
Samy Al Bahra
143bc4b336
regressions: Add ck_spinlock locked coverage.
12 years ago
Samy Al Bahra
4d2ccfe497
ck_rwlock: Add basic RTM interface to rwlock.
...
It is possible this will be moved to a self-contained file.
For a majority of architectures, RTM is an unnecessary
implementation-specific optimization.
12 years ago
Samy Al Bahra
7f5216c4c6
regressions/ck_sequence: Add fast-path latency measurement.
12 years ago
Brendon Scheinman
cb0a7c8ce6
Merge branch 'master' of https://github.com/sbahra/ck
12 years ago
Samy Al Bahra
d0745f51ee
regressions: Lower wait factor for ck_ticket_pb.
12 years ago
Samy Al Bahra
b63fe45460
regressions: Fix uninitialized usage in ck_hs parallel_bytestring.
12 years ago
Samy Al Bahra
03efd38742
regressions: Testing of ck_hs_fas functionality.
12 years ago
Brendon Scheinman
cbfa095108
Merge branch 'master' of https://github.com/sbahra/ck
12 years ago
Samy Al Bahra
137fb49951
regressions: Fix link order.
12 years ago
Brendon Scheinman
eacaacdb6e
ck_rwcohort: Fixed Makefile for automated regression testing
12 years ago
Brendon Scheinman
444df7dfe5
Merge branch 'master' of https://github.com/sbahra/ck
12 years ago
Samy Al Bahra
ca35d3bb75
regressions/ck_hs: Fix typo in Copyright statement.
12 years ago
Samy Al Bahra
4132ec4998
ck_epoch: Add ck_epoch_reclaim function.
...
This function allows for explicit execution of all
deferred callbacks in an epoch_record. The primary
motivation is currently for performance profiling
but there are other use-cases where best-effort
semantics could be applied.
12 years ago
Samy Al Bahra
281b5ad045
Merge branch 'master' of https://github.com/davidjoseph/ck
12 years ago
Brendon Scheinman
cc4b248bcb
ck_rwcohort: Renamed ck_rwcohort namespace
12 years ago
Brendon Scheinman
e0f46e6045
merged from upstream repo
12 years ago
Brendon Scheinman
0d20391563
ck_rw_cohort: Added benchmark tests for reader-writer cohort locks
12 years ago
Brendon Scheinman
f693a16253
ck_rw_cohort: Added neutral reader-writer lock
12 years ago
Brendon Scheinman
21750b9321
ck_rw_cohort: Added read-preference logic and updated validation test to use it
12 years ago
Samy Al Bahra
16e8b1c672
regressions/ck_ring: Allow for buffers of size 4 or more.
12 years ago
David Joseph
adc1e28856
regressions: Windows header and define fixes.
12 years ago
David Joseph
d17d8e87bb
regressions: Remove void * casting.
12 years ago
David Joseph
ce3426ffaf
Merge branch 'master' of git://git.concurrencykit.org/ck
12 years ago
David Joseph
7b94d7c13d
regressions: Make clean and gettimeofday fixes.
12 years ago
David Joseph
a4cd7f2ef2
Revert "regressions: Remove exes with make clean."
...
This reverts commit 9d37e38580
.
12 years ago
Samy Al Bahra
099ec934b2
regressions/ck_queue: Remove stale include file.
...
This was added during testing to verify parity with
sys/queue.h.
12 years ago
David Joseph
9d37e38580
regressions: Remove exes with make clean.
12 years ago
Samy Al Bahra
d05fb25cfd
regressions: Remove ITERATION specialization silliness.
12 years ago
Samy Al Bahra
7de2d45d1a
Merge branch 'master' of https://github.com/davidjoseph/ck
12 years ago
Brendon Scheinman
a352b46d0b
ck_rw_cohort: renamed ck_rw_cohort namespace
12 years ago
Samy Al Bahra
011a9751a6
ck_queue: Add traversal-safe SPMC STAILQ.
12 years ago
Samy Al Bahra
9cf089b157
regressions/ck_list: Coverage for INSERT_AFTER/INSERT_BELOW.
12 years ago
David Joseph
ebc58ede20
regressions: fix common_gettimeofday.
...
Accidentally moved code that sets tv_sec/usec outside of tv NULL check.
12 years ago
David Joseph
8c88190557
regressions: fix printing timevalues in MinGW.
12 years ago
David Joseph
ef2ad6b998
regressions: Implement common_gettimeofday.
...
Windows uses GetSystemTimeAsFileTime, which has some differences
with Unix' gettimeofday.
This commit also reduces the number of iterations for the ck_ticket_pb
validation to 1000 - the test was taking too long on MinGW systems.
12 years ago
David Joseph
36a2ba143a
Merge branch 'master' of https://github.com/sbahra/ck
12 years ago
Samy Al Bahra
34a5bf4266
regressions/ck_cohort: Whitespace cleanup.
12 years ago
Samy Al Bahra
676f8fed88
Merge branch 'cohort_trylock' of git://github.com/bscheinman/ck
12 years ago
Samy Al Bahra
5c90d917f7
regressions/ck_ring: More improvements and _size coverage.
...
SPMC path exercises random delays. Coverage exists for
the new *_enqueue_*_size
12 years ago
Brendon Scheinman
3fefa3b5a3
ck_cohort: Fixed regression tests based on ck_cohort_rw changes
12 years ago
Brendon Scheinman
77ff96b15a
ck_cohort_rw: Added latency and throughput benchmark regression tests
12 years ago
Brendon Scheinman
114c916fea
ck_cohort_rw: Cleaned up regression files from last commit
12 years ago
Brendon Scheinman
5e1b614108
ck_cohort_rw: Initial implementation with validation test.
...
I still need to implement benchmark tests and write documentation. The reader-writer cohort locks also required that I add a method to the existing ck_cohort framework to determine whether or not a cohort lock is currently in a locked state.
12 years ago
Brendon Scheinman
3c8728b214
ck_cohort: Added trylock support to cohort framework
12 years ago
Brendon Scheinman
78fbe93caa
ck_cohort: fixed regression tests to match new CK_COHORT_PROTOTYPE signature
12 years ago
Brendon Scheinman
ed5292546f
merged changes from main ck repo
12 years ago
David Joseph
60873b9af5
Merge branch 'master' of https://github.com/sbahra/ck
12 years ago
David Joseph
9640eabba8
regressions: Fix for common alarm init.
12 years ago
David Joseph
aaebc6b31b
regressions: Fix for common alarm prefixes.
12 years ago
David Joseph
da23134615
regressions: Fix for alarm interface.
12 years ago
David Joseph
0784be7ff0
regressions: Fix tests that use common alarm.
12 years ago
David Joseph
339a1bd639
regressions: Add prefix to common alarm interface.
12 years ago
Samy Al Bahra
7e9a020abd
regressions: Add ck_pflock clean target.
12 years ago
Samy Al Bahra
f6a53fd9de
ck_cohort: First-cut implementation of generalized cohort interface.
...
This work was contributed by Brendon Scheinman. This work is based
off "Lock Cohorting: A General Technique for Designing NUMA Locks".
12 years ago
Brendon Scheinman
5914bbe2c2
ck_cohort: Moved locks to separate cachelines in throughput test
12 years ago
Brendon Scheinman
c4e3edfeac
Merge branch 'master' of https://github.com/sbahra/ck into cohort
12 years ago
Brendon Scheinman
81a90e41a2
review: A couple more changes based on ck_cohort review
...
I added an extra argument to the CK_COHORT_INIT macro to allow users to specify custom pass limits
when using it. I also added a reference to the paper on which the cohort implementation was based.
12 years ago
Brendon Scheinman
803073b024
interface: Made ck_cohort interface more flexible for custom types
12 years ago
Brendon Scheinman
44ea3a4688
review: First round of review changes
...
The constants and macros in ck_cohort.h didn't conform to CK naming conventions. Additionally, I was able to remove a lot of unnecessary atomic operations and memory fences, which reduced latency by 10-20% and increased throughput using ticket locks by nearly an order of magnitude.
12 years ago
Samy Al Bahra
7ce276f5eb
regressions: Add ck_pflock to make check target.
12 years ago
Samy Al Bahra
54845bb8e7
ck_pflock: Phase-fair read-write lock implementation.
...
John Wittrock has contributed a phase-fair reader-writer
lock implementation. These locks allow phase fairness
guarantees between readers and writers. This work includes
additional changes and clean-up.
Follow-up work is expected.
Thanks to John Wittrock for patches and Professor Gabriel
Parmer (http://www.seas.gwu.edu/~gparmer/ ) for advising.
12 years ago
Brendon Scheinman
e06b4a26ff
cleanup: Removed unnecessary code copied from ck_spinlock's throughput test
12 years ago
Brendon Scheinman
2492f16ec9
whitespace: Added missing space to usage message
12 years ago
Brendon Scheinman
c6cd9e5be8
testing: Added throughput test for ck_cohort
12 years ago
Brendon Scheinman
2cb79b0658
testing: Added latency test for ck_cohort
12 years ago
Samy Al Bahra
27d454248d
ck_spinlock: Add ticket lock with trylock operation.
...
Upon popular request, added a variant of the ticket spinlock
with trylock support. This is pending additional verification
on other architectures besides x86*. It is still unclear whether
this implementation will be the default as it is has slower
fast path.
Add trylock support to the ck_spinlock validation tests.
It currently only tests ck_spinlock_ticket_t trylock
functionality if available.
12 years ago
Brendon Scheinman
59cc30b671
testing: ck_cohort validation
...
The ck_cohort validation test had an error that would cause an uneven distribution of threads among cohorts when the affinity delta was set above 1.
12 years ago
Brendon Scheinman
d5c05309b4
cleanup: ck_cohort validation test
...
Removed unnecessary includes and fixed shadowed variable warning.
12 years ago
Brendon Scheinman
0a826ca93b
gitignore: Removed ck_cohort validation binary from git
12 years ago
Brendon Scheinman
dbe49215ac
testing: Added validation test for cohorts.
12 years ago
David Joseph
10c3b22e48
Merge remote-tracking branch 'upstream/master'
...
Fix regressions for linux systems.
12 years ago
Samy Al Bahra
aef827b5a3
regressions: Remove unnecessary include.
12 years ago
Samy Al Bahra
81b9313e10
build: Fix regression introduced by MingW32 port.
12 years ago
David Joseph
8f1c31aa2c
Style changes to common.h's alarm macros.
12 years ago
David Joseph
3e469d7fb5
Namespace changes to regressions/common.h (alarm).
...
Add "local_name" to COMMON_ALARM_DECLARE_LOCAL and
COMMON_ALARM_DECLARE_INIT to avoid namespace conflicts.
12 years ago
Samy Al Bahra
9c298fc78b
whitespace: Remove unnecessary newline.
12 years ago
David Joseph
1298a6c335
Add support for MinGW32.
...
This primarily involved changing the configure script and adding
several utility functions to regressions/common.h for unit testing.
Signed-off-by: Samy Al Bahra <sbahra@appnexus.com>
12 years ago
Samy Al Bahra
9152cc7cea
regressions/ck_hp_fifo_donner: This was submitted from a Windows editor.
...
Switch to using UNIX EOL.
12 years ago
Samy Al Bahra
f9a484a10d
build: Disclaimer that regressions are unsupported for out-of-source builds.
12 years ago
Samy Al Bahra
cff7b1b21f
regressions/ck_queue: Add coverage for previous regression.
12 years ago
Samy Al Bahra
e517126247
regressions: Enable rdtsc for x86-32 targets.
12 years ago
Samy Al Bahra
72855320c4
regressions/ck_hs: Do not rely on ck_pr_add_64 for benchmarks.
...
ck_hs now officially targets the 32-bit ports. No advantage
to using ck_pr_*_64 operations here.
12 years ago
Samy Al Bahra
5d1fff2e06
regressions/ck_pr: Place double tests under feature flag.
12 years ago
Samy Al Bahra
33a9222923
legal: Update Copyright statements.
12 years ago
Samy Al Bahra
ca6637a57c
regressions/ck_pr: Utilize _GNU_SOURCE for ck_pr_store unit test.
12 years ago
Samy Al Bahra
3293cde2d2
regressions/common: Add missing header files in common.h
12 years ago
Samy Al Bahra
cb650246e2
regressions/ck_hp: Do not use empty loop body.
...
Fixes some GCC warnings in 4.7+.
12 years ago
Samy Al Bahra
0866206c1f
regressions/ck_ring: Add ck_ring_spmc to fast path test.
12 years ago
Samy Al Bahra
fbdc512304
regressions/ck_ring: Use variable for ring size.
12 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.
12 years ago
Samy Al Bahra
d55e588ee4
regressions/ck_ring: Fix use of uninitialized data.
...
Execution history exists such that first thread will dequeue
from an uninitialized ring buffer. The unit test has been
(un)fortunate in that it would busy-wait during dequeue.
Full barrier semantics will enforce visibility.
Reported by: Maxime Henrion <mhenrion@gma....>.
12 years ago
Samy Al Bahra
1f13c75a66
regressions/ck_pr_store: Add coverage for double.
...
It appears GCC doesn't handle IMM constraint gracefully
for double. This isn't an issue with clang.
12 years ago
Samy Al Bahra
56bd0b7424
regressions/ck_fifo: cache align MPMC fifo.
12 years ago
Samy Al Bahra
3f0a90813a
ck_ring: Unit test coverage for ck_ring_trydequeue.
12 years ago
Samy Al Bahra
5c93ee3add
regressions: Do not use ck_error for debug output.
12 years ago
Samy Al Bahra
f1be36b6d2
regressions/ck_ring: Fix erroneous usage of ck_error.
12 years ago
Samy Al Bahra
6bd946d019
regressions: Add ck_error convenience function.
...
Prints a message and then executes exit(EXIT_FAILURE).
12 years ago
Samy Al Bahra
90745e4d60
regressions/ck_ring: Silence GCC false positives.
12 years ago
Samy Al Bahra
911909ef31
regressions/ck_ring: Add ck_ring_spmc_template unit test.
12 years ago
Samy Al Bahra
b07c7808ce
regressions/ck_ring: Add strict fence around barrier and cache align ring.
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
8d90fa28ed
regressions/ck_ring: Add missing header file.
12 years ago
Samy Al Bahra
8d8f76845b
regressions/ck_ring: Add MPMC unit test.
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
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
533136627f
regressions/ck_stack: Cache align stack.
12 years ago
Samy Al Bahra
b0277346b8
regressions/ck_bytelock: Cache-align bytelock.
...
Signed-off-by: Samy Al Bahra <sbahra@repnop.org>
12 years ago
Samy Al Bahra
ac50efbeaf
regressions/ck_epoch: GCC 4.6.3 ignores used attribute in this case.
12 years ago
Samy Al Bahra
ddfdda3649
regressions/ck_epoch: Force generation of stack dereference in ck_epoch_synchronize.
12 years ago
Samy Al Bahra
099f13a24d
regressions/ck_epoch: Force generation of stack pointer.
12 years ago
Samy Al Bahra
31040a925d
regressions/ck_ht: Use random get counter.
...
We were erroneously printing reverse get results in serial.
12 years ago
Samy Al Bahra
ee2ae5a50f
regressions/ck_epoch: Update check target.
...
Makefile was ignored due to bogus gitignore entry.
12 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).
12 years ago
Samy Al Bahra
43b24d9f28
regressions/ck_hs: Initialize n_state.
12 years ago
Samy Al Bahra
44b845a53a
regressions/ck_hs: Use (char *) for debug output.
12 years ago
Samy Al Bahra
bc7a3e5606
regressions/ck_bag: Add status around sleep.
12 years ago
Samy Al Bahra
ece2895e9e
ck_hs: Drop ck_hs_hash_t abstraction.
...
No need for opaque type anymore.
12 years ago
Samy Al Bahra
adaf20b31c
ck_ht: Add ck_ht_stat function.
...
This can be used to expose certain performance metrics.
12 years ago
Samy Al Bahra
a40b724270
regressions/ck_hs: Add Makefile for benchmarks.
12 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.
12 years ago
Samy Al Bahra
67895cb87e
regressions/ck_epoch: Add support for multiple writers in poll unit test.
12 years ago
Samy Al Bahra
375a9eb816
regressions/ck_epoch: Drop debug flags.
12 years ago
Samy Al Bahra
034759c3b9
regressions: Update callers to ck_epoch_call.
12 years ago
Samy Al Bahra
657c50f823
regressions/ck_epoch: Multiple writers for synchronize unit test.
12 years ago
Samy Al Bahra
5293ad2348
regressions/ck_epoch: Reduce number of poll iterations, change peak calculation in synchronize.
12 years ago
Samy Al Bahra
57104fcde7
ck_epoch: Change to epoch semantics, bump grace period to 4.
12 years ago
Samy Al Bahra
ce7278140c
regressions/ck_epoch: Add missing header files.
12 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.
12 years ago
Samy Al Bahra
b220e50f54
regressions/ck_pr: Disable rest of width checks on bi-endian platforms.
12 years ago
Samy Al Bahra
6961547dfe
regressions/ck_pr: Remove unnecessary assignment in Makefile.
12 years ago
Samy Al Bahra
98660bf560
regressions/ck_pr: Disable width checks on bi-endian architectures.
12 years ago
Samy Al Bahra
7ebbcf55b1
regressions/ck_spinlock: Disable linux_spinlock on unsupported platforms.
12 years ago
Samy Al Bahra
d72ca391f6
ck_bytelock: Switch to RMO model.
12 years ago
Samy Al Bahra
bac1c1d26a
regressions/ck_stack: Disable various TRYMPMC benchmarks on unsupported platforms.
12 years ago