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
Samy Al Bahra
e88c91cdbd
ck_elide: Use CK_CC_INLINE instead of inline.
9 years ago
Olivier Houchard
37d94f4f4e
ck_pr/arm : Add load, store and CAS for double.
9 years ago
Michael Haberler
118cc8eae8
configure: detect git SHA, export as string CK_GIT_SHA in ck_md.h
...
this helps correlating tests by other people
9 years ago
Michael Haberler
ce7d26aad4
ck_mg.h: provide printable version tag as CK_VERSION
9 years ago
Olivier Houchard
c0c0b19716
configure: Add --platform and --use-cc-builtins
...
--platform let you set the platform, instead of relying on uname -m
--use-cc-builtins force the usage of gcc atomic builtins, instead of using the one provided by CK.
9 years ago
Michael Haberler
abc8e871af
arm/c++: cast arguments using CK_CPP_CAST
9 years ago
Michael Haberler
9911e46c7d
x86_64/c++: cast arguments using CK_CPP_CAST
9 years ago
Michael Haberler
a9005e55f1
c++: introduce CK_CPP_CAST to static_cast arguments
9 years ago
Olivier Houchard
d2ee99b7f4
ck_pr/arm : Tell the compiler to which "1" he should jump to.
9 years ago
Olivier Houchard
576e65fc74
ck_ht: Fallback to use 32bits values when 64bits load/store isn't supported.
...
That way we can use ck_ht on i386.
9 years ago
Samy Al Bahra
f6f02e8585
Merge pull request #54 from mhaberler/limits
...
ck_limits.h: assure UINT*_MAX ff are available in-kernel
9 years ago
Samy Al Bahra
35f9ff1ede
Merge pull request #53 from mhaberler/typeof
...
CK_PR_ACCESS: use __typeof__ instead of typeof
9 years ago
Samy Al Bahra
b039de2f2f
ck_cc: Add parenthesis to make default easier.
9 years ago
Michael Haberler
383eb139ff
ck_limits.h: assure UINT*_MAX ff are available in-kernel
...
this should work back to at least 3.5 kernels
9 years ago
Michael Haberler
ac1c170b29
CK_PR_ACCESS: use __typeof__ instead of typeof
...
this makes ck_pr.h safe to include in c++ with -std=c++11
9 years ago
Olivier Houchard
1c3501a524
ck_pr/arm : Don't try to build the 64bits version of CAS for armv6 either.
9 years ago
Olivier Houchard
005c06f9e2
ck_pr/arm: There's no need to force the use of r4, r5 and r6 anymore, this should fix issue #50
9 years ago
Olivier Houchard
b002ed5f11
ck_pr/arm: Don't use ldrexd/strexd if we're building for armv6.
9 years ago
Olivier Houchard
b202a8224a
ck_pr/arm: Rename ck_pr_[load|store]_64 to ck_pr_md_[load|store]_64, as it should have been done.
9 years ago
Emilio G. Cota
3f48bc39fb
ck_sequence: relax sequence increment from atomic to regular store
...
The atomicity of the sequence number's increment is unnecessary, since
there should be only one writer at any given time. Fix it by changing
it for a regular increment + store.
Signed-off-by: Emilio G. Cota <cota@braap.org>
10 years ago
Samy Al Bahra
3971541783
ppc: lwsync is the right thing for WB-memory.
...
We will expose a flag to enable isync.
10 years ago
Samy Al Bahra
41c1080f43
ck_bytelock: Fall-back to store_8 if FAS is unavailable.
10 years ago
Samy Al Bahra
c2ce635080
spinlock/ticket: Remove dead variable.
10 years ago
Samy Al Bahra
a5b4ca9ffc
ck_pr/ppc64: Use unsafe for ugly aliasing hack.
...
Once we migrate to using the wrappers, this ugliness won't be
necessary. Last argument can be macro-expanded instead.
10 years ago
Samy Al Bahra
e693cb9afe
ck_*lock: Migrate all locking primitives to lock / unlock.
...
This only affects RMO. This adds stricter semantics for critical section
serialization. In addition to this, asymmetric synchronization primitives will
now provide load ordering with respect to readers.
This also modifies locked operations to have acquire semantics
(they're there for elision predicates, and this doesn't impact them
in any way). There are several performance improvements included in this
as well (redundant fence was removed from days of wanting to support
Alpha).
10 years ago
Samy Al Bahra
1537c8091d
ck_pr: Introduce ck_pr_fence_lock and fence_unlock.
...
These primitives are meant to be used in lock implementations
where control dependency ordering is sufficient to enforce
ordering of critical section. At the moment, this only affects
PPC. Currently, we rely on lwsync for entry into critical sections
which is insufficient. sync is rather heavy-weight, and assuming
we aren't falling victim into compiler re-ordering, isync should
be sufficient.
There is follow-up work to be done in ARM, as we may have cheaper
(but target-specialized) ISB-tricks for load-load ordering.
10 years ago
Samy Al Bahra
787cffe9c9
ck_pr/arm: store_load requires DMB.
...
Emit full synchronize for store_load.
10 years ago
Samy Al Bahra
b2407aa3f0
whitespace/mcs: Wrap to 80 columns.
10 years ago
Samy Al Bahra
060ef37e5e
whitespace/ck_bitmap: Fix minor typo in comments.
...
Urban Dictionary reveals a particular interpretation of exclusing.
10 years ago
Samy Al Bahra
0e8d445049
ck_epoch: Specialize begin according to memory model.
...
Previously, we were specializing for x86.
10 years ago
Samy Al Bahra
a26c891f1a
ck_hp_fifo: Migrate to ck_hp_set_fence.
...
On Pentium M, this yields 30%-40% reduction in latency.
10 years ago
Samy Al Bahra
419ddca3ad
ck_hp_stack: Switch to ck_hp_set_fence.
10 years ago
Samy Al Bahra
9efb74da4b
ck_hp: Implement ck_hp_set_fence.
...
On TSO architectures, this relies on atomic ordering guarantees
rather than a full barrier. On Pentium M, this results in
approximately 30% improvement in latency for stack.
10 years ago
Olivier Houchard
8b0bdb1901
ck_rhs: Introduce ck_rhs_set_load_factor() to change the load factor.
...
The default value is still 50, but that may be revisited later.
Also, pre-calculate the max number of entries before growing, toi avoid
having to do it at each insert.
10 years ago
William Light
e9d96eb9f6
ck_ring: make a few arguments const
10 years ago
Olivier Houchard
477b37b249
gcc/ck_pr: I made up my mind, ck_pr_stale() has to provide a compiler barrier.
10 years ago
Olivier Houchard
a30c54f64a
gcc/ck_pr: Revert previous commit
10 years ago
Olivier Houchard
6dc4d2664f
gcc/ck_pr: ck_pr_stall() should act as a compiler barrier too.
10 years ago
Samy Al Bahra
63d6c00c3d
gcc/ck_pr: GCC-backed primitives should serve as compiler barriers.
...
Olivier pointed out that he was seeing some load / store operations
get optimized away and / or re-ordered otherwise.
10 years ago
Samy Al Bahra
8ee26212f9
ck_pr: Reference MD-implementation for CAS wrapper.
10 years ago