Samy Al Bahra
f00aaa977b
build: add --disable-sse option for x86.
...
This option allows user-space to disable explicit usage of SSE+ instructions
such as sfence, lfence and mfence on x86.
7 years ago
Samy Al Bahra
5517381929
freebsd/x86: Allow and override fence instructions to match kernel environment.
...
This is mostly based off of Olivier's (cognet@) work. I was considering
importing in __mbk but realistically, doesn't warrant the refactor.
7 years ago
Samy Al Bahra
a2d1743476
[whitespace] gcc/x86/ck_pr: closing comment for UMP ifdef block.
7 years ago
Samy Al Bahra
0d7c1e78f3
freebsd/ck_md: md implementation for FreeBSD kernel.
7 years ago
Samy Al Bahra
14e51eaa91
ck_pr/sparcv9: use the more stringent #MemIssue barrier.
...
This is to match the semantics of the FreeBSD kernel.
7 years ago
Samy Al Bahra
4042fea5a8
ck_pr/x86_64: cleanup documentation around semantics.
...
A note has also been added around some ambiguity with respect to WC
memory and relaxed memory semantics (so, heavier-weight mfence semantics
for strict acquire-release interface).
All fences related to atomic operations have been removed as they were
just unnecessary, and so, confusing.
7 years ago
Samy Al Bahra
a15873e006
[whitespace] ck_md.h.in: Remove space before newline.
7 years ago
Aidan Cully
5f6834b693
ck_queue: fix logic inversion in CK_STAILQ_CONCAT.
...
STAILQ_CONCAT transcription error lead to inversion of logic. It would only work for empty lists.
7 years ago
Riley Berton
0d1e86d18e
ck_hs: add ck_hs_next_spmc
...
Memoize the map into ck_hs_iterator_t to make iteration more safe in the face of growth or shrinkage of the map. Tests for same.
Work from Riley Berton.
7 years ago
Samy Al Bahra
4a8957f727
[whitespace] ck_ring: style conformance.
8 years ago
Paul Khuong
44a6527f33
ck_ring.h: make _ck_ring_enqueue_mp less failure happy
...
With preemption, it is possible for _ck_ring_enqueue_mp to have a
snapshot of p_head so stale with respect to the later snapshot of
c_head that a comparison modulo (small) ring size will erroneously
conclude that the ring is full.
Detect that case and retry rather than failing. We only retry when
the enqueuers have made global forward progress, so the first loop
is as lock-free as it ever was.
Bonus: the new condition should be marginally faster.
8 years ago
Samy Al Bahra
8b617bb728
ck_pr: add support for s390x.
...
Add s390x support. Neale Ferguson is the architecture maintainer.
8 years ago
Samy Al Bahra
8343bd4af8
spinlock/dec: backoff until lock state transition in lock_eb.
...
This fixes an issue caught by Changwoo Min (@multics69).
8 years ago
Neale Ferguson
52809f0039
Minor editorial updates and update CFLAGS for production use
8 years ago
Neale Ferguson
2c01ecec64
Add s390x support
8 years ago
Samy Al Bahra
0ce7c1efef
ck_epoch: remove overzealous padding.
...
Pack shared linkage together in epoch record. Remove unnecessary
padding in epoch instance.
8 years ago
Samy Al Bahra
123c91a62f
epoch: update delref prototype.
8 years ago
Samy Al Bahra
ffe9cbf9ca
ck_epoch: ck_epoch_end returns true if forward progress has been made.
8 years ago
Samy Al Bahra
6a9da5c91d
ck_epoch: add epoch_value to return current global epoch.
8 years ago
Samy Al Bahra
ec2d225324
ck_epoch: add barrier_wait operation.
8 years ago
Samy Al Bahra
8580ccc580
ck_epoch: introduce synchronize_wait that allows blocking synchronize operation.
8 years ago
Samy Al Bahra
a25e073a2b
ck_epoch: allow record sharing and reentrancy for write-side operations.
8 years ago
Alexey Kopytov
5f1be5dc83
AArch64 LSE support.
...
Add a new configure option, --enable-lse, which is only effective for
the AArch64 architecture. When used, most ck_pr_* atomics will use Large
System Extensions instructions as per the ARMv8.1 specification, rather
then LL/SC instruction pairs.
8 years ago
Olivier Houchard
dae84bac06
ck_pr/aarch64: style.
8 years ago
Olivier Houchard
4425c94ef7
ck_pr/aarch64: Don't forget the "cc" and "memory" clobbers.
8 years ago
Olivier Houchard
02af290b85
ck_pr: Add an option to disable any double function
8 years ago
Olivier Houchard
2868848a2f
ck_pr/ppc: Get the right prototype for ck_pr_cas_ptr_value().
8 years ago
Olivier Houchard
5ae12a19d0
gcc/ck_pr: Try to make sure the compiler isn't unhappy about constness.
8 years ago
Olivier Houchard
1c9257af77
ck_pr: missed a few occurrences of stdbool.h that should be ck_stdbool.h.
8 years ago
Olivier Houchard
2159452170
ck_pr/aarch64: Use the right asm constraints.
...
We don't have to claim we will read the value from variables when we do not,
this was only done to work around a bug on some versions of gcc for arm
a while ago, hopefully this won't be needed here.
This should fix the (harmless) warnings described in issue #83 .
8 years ago
Olivier Houchard
7c456ca778
ck_pr/aarch64: That should be CK_PR_AARCH64_H, not CK_PR_ARM_H
8 years ago
Olivier Houchard
92aabcade0
ck_pr: First cut at an aarch64 native implementation.
...
This seems to survive a "make check" on a 48 cores arm64 board.
8 years ago
Olivier Houchard
9c072391cf
ck_pr/arm : We never defined CK_PR_CAS_S, so there's no need to undef it.
8 years ago
alfredo
bc594bf809
use __restrict__ under GCC to support both C++ and C
8 years ago
铁哥
4f01918cbb
Update ck_ring.h
...
fix bug
8 years ago
Roman Lebedev
1a10ab230e
ck_queue: update doc: no tail queue, add STAILQ description
...
Singly-linked tail queue description is taken from sys/queue.h
9 years ago
Samy Al Bahra
2686ca0223
ck_epoch: Bug fixes and performance improvements.
...
- ck_epoch_begin: Disallow early load of epoch as it leads to measurable
performance degradation in some benchmarks.
- ck_epoch_synchronize: Enforce barrier semantics.
9 years ago
Samy Al Bahra
80a9b6ff9c
epoch: Fix fat-finger that breaks epoch sections.
...
And this is why tests should also be validated against
fault injection.
9 years ago
Samy Al Bahra
ff23c2d3fd
ck_bitmap: Use CK_BITMAP_OFFSET.
9 years ago
Samy Al Bahra
7646fb624b
ck_pr: fence_memory now has strict semantics on TSO.
...
The old behavior was from the world before the great fence
refactor.
9 years ago
Samy Al Bahra
9893f12bcf
ck_ht: ck_hm not making it to next release, remove warning.
9 years ago
Samy Al Bahra
2e75aefc4a
ck_epoch: Allow for forward progress in concurrent epoch sections.
...
This work is derived directly from the work of John Esmet and Paul
Khuong ({jesmet,pkhuong}@appnexus.com) and PR34.
9 years ago
Samy Al Bahra
0d6d384f3f
ck_epoch: Cache associated epoch state machine in record.
...
This ends up removing arguments (and vector for error) for several
functions on the common path of ck_epoch.
9 years ago
Paul Khuong
f1302c4920
ck_ring: explicit casts to clarify the semantics of generic (pointer) dequeuing
9 years ago
Samy Al Bahra
52f42c4392
ck_pr: Add ck_pr_fence_acqrel.
...
Provides both acquire and release semantics.
9 years ago
Olivier Houchard
27fb1bc00f
ck: Reimplement a few libc headers, to make CK build when compiling in the
...
FreeBSD kernel.
9 years ago
Samy Al Bahra
4677de8473
ck_ring: [whitespace] Add comment to PROTOTYPE family.
9 years ago
Samy Al Bahra
fee4e7187b
ck_ring: Clean-up internal implementations.
...
Break out internal implementations to _mp and _sc variants from which
public interface is built on. Do not rely on macro. Adopt CK_CC_RESTRICT
instead of using restrict directly.
9 years ago
Samy Al Bahra
414ba224ca
ck_cc: Add FORCE_INLINE attribute and remove stale comments.
9 years ago
Samy Al Bahra
cc600e7d4f
ck_ring: Add MPMC and MPSC variants.
9 years ago