New release: 0.5.0

56 views
Skip to first unread message

Samy Al Bahra

unread,
Nov 1, 2015, 5:29:03 PM11/1/15
to concurr...@googlegroups.com
I am pleased to announce release 0.5.0 of Concurrency Kit. It has been a while
and a lot has gone into this release, including a bug fix and several
enhancements. In summary, this release includes fixes to FreeBSD kernel
support, improvements and bug fixes to ck_ht (which will be deprecated starting
next feature release), build system improvements, improved type-safety in
ck_pr, C++ support for ck_pr, improvements to the stub ck_pr layer (builtin
fallback), performance improvements to ck_sequence, new concurrency primitives
and enhancements to ck_ring.

ck_ht: Upgrade if you're using it. Code was slightly refactored so that version
counter increment is deferred to explicit tombstone re-use. This fixes an issue
(also impacts TSO) where it is possible for an inconsistent pair to be observed
by a load operation if it is preempted after observing the version counter and
key field of a slot, then the slot is moved *and* re-used by another key-value
pair by a writer through either a compacting set/put operation or a delete and
set/put operation. This also fixes another issue on RMO architectures on the
delete path. These changes also improve performance. Starting next feature
release, ck_ht will be deprecated. The interface was an experiment in aligning
developer laziness with writing performant code, and the end-result is an
interface that is too error-prone and boilerplate-heavy for our tastes.

ck_ht / ck_hs: Initialize will explicitly set size to a minimum of a cache-line.

ck_hs: Some unnecessary atomic operations have been removed. Legacy from
MPMC variant that was in the works.

ck_bytelock: Minor performance improvements.

build: Improvements to --profile and now there is a CC built-in target
available for porters (--use-cc-builtins to configure), for convenience.

ck_epoch: The API has been changed so it is no longer necessary to pass a
ck_epoch object to begin/end/call/etc... after a record has been registered.
This is a mechanical change. In addition to this, begin and end now take an
optional ck_epoch_section_t (section marker) object reference. If section
markers are used then write-side operations can make forward progress
(according to EBR semantics) even if records do not explicitly go inactive (as
long as they continue entering new protected sections).

ck_hp: Added a ck_hp_set_fence operation which sets a hazard pointer
and provides strong (full) ordering guarantees. On TSO architectures,
this is implemented in terms of an atomic operation for improved
performance. All data structures have also switched to using this interface.

ck_pr: C++ support was added as a one-off. Don't expect this in the data
structures.

ck_pr_rfo: A new ck_pr_rfo operation was added that emits "prefetchw" on AMD
and Intel. This operation does a read-for-ownership that allows for reduced
cache coherency traffic in cases where shared mutable state is prefechable and
transitions from read to write. "prefetchw" was only added to Broadwell on
Intel, and will be compiled to a regular prefetch otherwise (note potential for
performance regressions if you're not careful). AMD has had prefetchw for a
while.

ck_pr_*_ptr: ck_pr_store_ptr and ck_pr_load_ptr now have assignment semantics.
The old memcpy-like semantics can be found with _unsafe suffix. For example,
ck_pr_store_ptr_unsafe and ck_pr_load_ptr_unsafe. Your compiler should now emit
warnings if there are type mismatches in pointer load and store.

ck_pr_fence_*: A new acqrel fence has been added that provides acquire-release
fence.

ck_pr/gcc: Added missing compiler barriers to the compiler port. This backend
is only meant to be used for staging when developers are porting Concurrency
Kit to a new architecture.

ck_pr/arm: Fixes to 64-bit load and store operations.
Fix invalid store_load barrier to utilize full memory barrier.

ck_rhs: Introduced a ck_rhs_set_load_factor to set target load factor
for RHS. The default value is still 50 but that is subject to change.

ck_ring: Now we have SPSC/SPMC/MPMC/MPSC variants of ck_ring. The MP* variants
require only one atomic operation on the write path but do not provide
non-blocking forward progress guarantees for the writer. Enqueues operation can
make forward progress with respect to incoming dequeue operations but serialize
with respect to other enqueue operations.

ck_sequence: Atomic operations were removed in favor of regular store
operations.

FreeBSD kernel support: Everything should "just work" if you plop
Concurrency Kit into a FreeBSD kernel source-tree and make sure that the
root is included in the build system.

- Thanks to John Wittrock and Paul Khuong for their contributions to improved
type-safety of load and store primitives.
- Thanks to Olivier Houchard for his continued work on the ARM port, ck_rhs,
FreeBSD kernel support and his port of ck_ht to 32-bit architectures.
- Thanks to Scott Long for his help with FreeBSD kernel support.
- Thanks to John Esmet and Paul Khuong for their contribution of EBR
section markers.
- Thanks to Phil Sorber for his build system improvements.
- Thanks to Emilio Cota for his build system improvements, manual page
improvements and contributions to ck_sequence.
- Thanks to Michael Haberler for his build system improvements. Thanks to
the MachineKit project.

Download:
http://concurrencykit.org/releases/ck-0.5.0.tar.gz
http://concurrencykit.org/releases/ck-0.5.0.zip
http://concurrencykit.org/releases/ck-0.5.0.spec


--
Samy Al Bahra [http://repnop.org]

Samy Al Bahra

unread,
Nov 1, 2015, 5:55:55 PM11/1/15
to concurr...@googlegroups.com
Correction re:ck_ht: This issue did not affect compaction. It affected concurrent load with concurrent delete *and* said re-use (explicit ck_ht_delete to put/set).
Reply all
Reply to author
Forward
0 new messages