Pointer packing is now disabled by default for x86_64 targets.
Jeffrey M. Birnbaum <jmbny.@...> told me that according to his
discussions with Intel engineers, Haswell will be bumping up
VMA bits to 56 bits from 48.
If you control the hardware that CK is deployed to and don't
envision a migration to 48-bits anytime soon, then you may
enable old behavior (resulting in significant memory savings
for some data structures, namely ck_ht) by passing the
--enable-pointer-packing flag to configure.
This is a hash table that is optimized for architectures that
implement total store ordering and workloads that are read-heavy
involving a single writer and multiple readers. Unlike traditional
non-blocking multi-producer/multi-consumer hash table
implementations this version allows for immediate re-use of deleted
buckets (no need for explicit reclamation cycles) and is more
conducive to traditional safe memory reclamation schemes used in
unmanaged languages (otherwise, we would require key duplication).
It is relatively heavy-weight for MPMC workloads on architectures
which do not implement TSO in comparison to Click's MPMC hash
table. However, it still has better performance characteristics
than a blocking hash table.
The committed version currently only provides x86_64 support. This is
being committed for review by peers and for a silent release that will
allow us to test ck_ht_spmc under high production workloads.
Next public release will include additional documentation as well as
support for other architectures.
In the mean time, please see the unit tests for example usage. Included in
this commit: Dropped -Wbad-function-cast from GCC port.
build:
- configure step will generate relevant CFLAGS.
- build profiles are for convenience (developers can use themu
for cross-compilation).
regressions:
- Renamed ck_barrier unit tests to work-around behavior
of Solaris linker.
- Adopted use of a PTHREAD_CFLAGS variable.
ck_cc:
- Added internal CK_CC_IMM macro for compilers that are
verbose against impossible inline constraints (or limited
optimizers).
ck_pr/x86*:
- Adopted CK_CC_IMM macro.
- Dropped redundant constraints.
This work was mostly completed by Theo Schlossnagle
<jesus@omniti.com>, much thanks to him. He has
also provided access to a machine with Sun Studio 12.
It has been changed to behave more like an autoconf-generated
configure script. Please see --help for more information.
Some options have been removed including --cflags and --compiler.
Other options have been renamed and have different semantics
now (headers and library specify full path).
Previously, we wouldn't build on 32-bit architectures, let alone
configure. This was due in part to some issues where we essentially
ignored setting CFLAGS properly.
In addition, FreeBSD and possibly other BSDs only report i386 for any
32-bit x86 architecture. This has the side-effect that we have to do
some additional guesswork to determine the actual CPU. Since we make use
of cmpxchg8b, we require an i586 machine. FreeBSD's default 32-bit gcc
-march setting is i486, so in effort to make things easier for FreeBSD
users on 32-bit, set that to i586 by default.
Linux makes this a little easier for us, since its uname actually
returns useful information about the architecture (and assumedly the
compilers for that architecture target the same arch at a minimum), so
we will refuse to work on i386 / i486 on Linux as well.
But really, I'd be slightly surprised at a ton of use on pentium/k5.