Fixed memory ordering
[libcds.git] / change.log
1 2.3.0
2     General release
3     - Changed: cds::gc::HP is totally refactored:
4         - simplified internal structures;
5         - added ability to specify an external allocator for internal data;
6         - external API for gc::HP is slightly changed: now scan type
7           cannot be changed on the fly; it can be specified only in
8           construction time.
9     - Changed: cds::gc::DHP is totally refactored to overcome some internal
10       limitations. Now gc::DHP is fully adaptive variant of Hazard Pointer 
11       SMR, any dependencies on count of thread are removed, count of retired
12       data and hazard pointers per thread are increased automaticaly by perforce.
13       External API of gc::DHP class is changed: now only initial count 
14       of hazard pointers can be specified in the constructor. Like new gc::HP,
15       the new gc::DHP supports an external allocator.
16     - Changed: exception handling. Now, exceptions raise by invoking new 
17       cds::throw_exception() function. If you compile your code with exception disabled,
18       the function prints an exception message to stdout and calls abort()
19       instead of throwing.
20     - Flat Combining: fixed memory-order bug that can lead to crash on weak ordered
21       architecture like PowerPC or ARM
22     - Added: erase_at( iterator ) function to MichaelHashSet/Map and SplitListSet/Map
23       based on IterableList
24     - Fixed a bug in BronsonAVLTreeMap::extract_min()/extract_max()/clear().
25     - Removed: signal-handled threaded uRCU (cds::urcu::signal_threaded) due
26       bad performance
27     - Added more flat-combining queue tests, thanks to Marsel Galimullin.
28     - Changed cmake scripts to support MacOS and ARMv7/ARMv8 (64 bit),
29       thanks to Michail Komarov (https://github.com/Nemo1369)
30     - Stress tests: removed command line parameter --detail-level and
31       envvar CDSTEST_DETAIL_LEVEL for reducing compile time and executable size.
32       To make full testset compile libcds with -DCDS_STRESS_TEST_LEVEL=N where
33       N is 1 or 2.
34     - Changed: refactoring cds::backoff::exponential and cds::backoff::delay
35       back-off strategies to avoid static data members in template classes. 
36  
37 2.2.0 04.01.2017
38     General release
39     - Changed: CMake is used for build libcds. Ancient build.sh has been removed
40     - Changed: unit and stress tests are migrated to googletest framework
41     - Added: IterableList - an implementation of ordered list with 
42       thread-safe iterator. MichaelSet/Map and SplitListSet/Map support 
43       this type of ordered list and thread-safe iterable too.
44     - Added: wait strategies for flat combining technique. Based on
45       research by Marsel Galimullin and Nikolai Rapotkin.
46     - Fixed: SkipList erase() and find() bugs that cause to infinite loop 
47       or to program crash in rare case.
48     - Fixed: serious bug in MichaelSet::emplace() function
49       New node was created twice from the arguments by move semantics. 
50       However, move semantics may change internal state of the argument
51       that can lead to an incorrect element and even an incorrect key
52       that breaks the set logic.
53     - Fixed: bug in FeldmanHashSet::erase_at( iterator ): due an error
54       in precondition checking the function may incorrectly return false.
55     - Fixed: possible double-free case in flat combining algorithm. 
56       Thanks to Amila Jayasekara who pointed me to this problem
57     - Changed: cds::opt::buffer option is divided to initialized
58       (cds::opt::v::initialized_dynamic_buffer, cds::opt::v::initialized_static_buffer)
59       and uninitialized (cds::opt::v::uninitialized_dynamic_buffer, cds::opt::v::uninitialized_static_buffer)
60       ones. The old cds::opt::v::dynamic_buffer and cds::opt::v::static_buffer classes
61       are removed.
62     - Removed: TsigasCysleQueue (due undecidable ABA-problem)
63     - Removed: Michael's allocator cds/memory/michael/allocator.h
64     - Fixed: use-after-free bug in VyukovMPMCCycleQueue internal buffer.
65       To prevent this bug the queue uses an uninitialized buffer now.
66     - Fixed: rare priority inversion bug in MSPriorityQueue
67     - Added: for minimizing runtime of stress test the detail level for some test is added.
68       Command line argument --detail-level=N specifies what test should be ran: each
69       test with level not greater than N will be ran. Instead of command line arg
70       the enviromnent variable CDSTEST_DETAIL_LEVEL=N may be used.
71       By default, the detail level is 0 that means only limited set of the test will be ran.
72
73 2.1.0 06.01.2016
74     General release
75     - Added: FeldmanHashSet/Map - an interesting hash map algorithm
76       based on multi-level array, requires perfect hashing or fixed-sized keys.
77       Supports thread-safe bidirectional iterators.
78     - Added: BronsonAVLTreeMap - Bronson's et al AVL tree implementation
79     - Added: CMake build script, thanks to Eugeny Kalishenko
80     - Changed: SplitList performance improving, thanks to Mike Krinkin
81     - Changed: semantic of member functions extract(), get() and its
82       variants for MichaelList RCU-based specialization: extract() does not
83       require RCU locking, get() now returns special wrapper object of type raw_ptr,
84       see doc.
85       Thus, semantics of extract()/get() of all RCU-based set and maps based on 
86       MichaelList (MichaelSet/Map, SplitListSet/Map) has been changed too.
87     - Changed: SplitListSet/Map functions get() and get_with() return special wrapper
88       object of type raw_ptr, see doc.
89     - Removed: SplitListSet/Map force_dispose() function.
90     - cds::lock namespace is renamed to cds::sync. All classes defined in cds::lock namespace 
91       are moved to cds::sync with new names (for example, cds::lock::SpinLock is renamed to
92       cds::sync::spin_lock). cds::lock namespace and its contents is deprecated, it is kept 
93       for backward compatibility.
94     - The library has been checked by ThreadSanitizer, a lot of bugs has been fixed
95     - Added support for clang 3.7 with libc++
96
97 2.0.0 30.12.2014
98     General release
99     - the library has been rewritten to support at least C++11. Compilers: GCC 4.8+, clang 3.3+, 
100       MS Visual C++ 12 (2013) Update 4 an above.
101     - Removed: MichaelDeque, reason: the implementation is heavy-weighted, inefficient,
102       and, seems, unstable.
103     - Removed: cds::gc::HRC garbage collector, reason: the implementation is inefficient 
104       and unstable.
105     - Changed: all container's declaration except StripedSet has been unified to the
106       following traits-based form: 
107            class Container< GC, T, Traits >
108     - Added: new member function pop_with(Func) to cds::container::TreiberStack
109     - Added: new member functions enqueue_with(Func), dequeue_with(Func) to 
110              cds::container::MSQueue
111              cds::container::MoirQueue
112              cds::container::BasketQueue
113              cds::container::OptimisticQueue
114              cds::container::RWQueue
115              cds::container::SegmentedQueue
116              cds::container::TsigasCycleQueue
117              cds::container::VyukovMPMCCycleQueue
118     - Added: new member functions push_with(Func) and pop_with(Func) to cds::container::MSPriorityQueue
119     - SegmentedQueue: add padding into segmented_queue::traits to eliminate false sharing.
120     - Changed: guarded_ptr and exempt_ptr have move semantics now. The container's extract() and get()
121       member functions return the objects of that type.
122     - Changed: improved cds::gc::HP and cds::gc::DHP internal implementation
123     - Changed: map member function insert_key() has been renamed to insert_with()
124     - Changed: cds/cxx11_atomic.h has been renamed to cds/algo/atomic.h
125     - Removed: cds/refcounter.h
126
127 1.6.0 23.09.2014
128     General release
129     - Add flat combining (FC) technique and FC-based containers: FCStack, FCQueue, 
130       FCDeque, FCPriorityQueue
131     - Add elimination back-off feature to TreiberStack class
132     - Add SegmentedQueue - an unfair queue implementation
133     - New member functions for sets and maps:
134       Functions get() and get_with() search a key and return the pointer to item found 
135       in safe manner.
136       Function extract() searches a key, unlinks the item found from the container 
137       and returns pointer to item in safe manner.
138       The functions get, get_with, extract, extract_with extract_min, extract_max 
139       has been added to the following container:
140         SkipListSet, SkipListMap
141         EllenBinTree, EllenBinTreeSet, EllenBinTreeMap
142       The functions get, get_with, extract, extract_with has been added 
143       to the following container:
144         MichaelList, LazyList
145         MichaelHashSet, MichaelHashMap
146         SplitListSet, SplitListMap
147     - Fix a serious bug in cds::gc::HRC
148     - Changed MSPriorityQueue to simplify interface and to fix possible pop() deadlock
149     - Fix a bug in BasketQueue
150     - Fix EllenBinTree crash under high contention
151     - Changed: the thread manager detach order to prevent crashing of signal-handled RCU
152       in some case.
153     - Changed: cds::gc::HP calls Scan() when a thread is detached.
154       This prevents accumulating retired data.
155     - Changed: minimal boost version is 1.51
156     - Removed: file cds/lock/rwlock.h
157
158 1.5.0 29.12.2013
159     General release
160     1. Added: EllenBinTree - an implementation of unbalanced binary search
161       tree based on paper [2010] F.Ellen, P.Fatourou, E.Ruppert, F.van Breugel 
162       "Non-blocking Binary Search Tree".
163     2. Added: MSPriorityQueue - an array-based lock-based priority queue heap, 
164       see [1996] G.Hunt, M.Michael, S. Parthasarathy, M.Scott "An efficient 
165       algorithm for concurrent priority queue heaps"
166     3. Added support for boost.atomic for boost 1.54 and above. 
167       Now, libcds supports processor architecture like ARM, PowerPC and any other
168       that are supported by boost.atomic or by C++11 compiler. Any feedbacks are appreciated.
169       To use boost.atomic you should specify -DCDS_USE_BOOST_ATOMIC in compiler's command line.
170     4. Added: a new CDS_USE_LIBCDS_ATOMIC preprocessor flag has been added to direct
171       the compiler to use libcds atomic unconditionally.
172     5. build.sh has been modified to relax processor architecture and OS requirements. 
173       This allows to use libcds with native compiler atomic support (or boost.atomic) 
174       for a processor architecture that has not been tested by libcds's developers.
175     6. Added support for CLang 3.3
176     7. Added support for MS VC++ 2013
177     8. Added support for Mac OS X, see build/sample/build-osx-clang-libc++.sh, 
178       build/sample/build-osx-gcc.sh for example.
179     9. Fixed: SkipListSet::erase_with does not take into account "less" predicate parameter.
180     10.Fixed: some bugs in SkipListSet leading to deadloop
181     11.Fixed: MichaelMap bug: computing hash value for type Q different from key type.
182
183 1.4.0 20.05.2013
184     General release
185     1. Added: user-space RCU garbage collector (5 different implementations), 
186        see cds::urcu namespace
187     2. Added: RCU-related set/map container specializations
188     3. Added: Skip-list specialization for cds::gc::nogc (undeletable skip-list)
189     4. For set/map classes: find_with and erase_with member functions have been added.
190        These functions allow to use different predicates for searching.
191     5. Added: threading model based on Ñ++11 thread_local keyword (CDS_THREADING_CXX11).
192        At present, only gcc 4.8 supports such model.
193     6. Fixed: bug #11 "ABA bug in libcds 1.3.1 cds/intrusive/msqueue.h"
194        Thanks to Jelle van den Hooff.
195     7. Added support for GCC 4.8
196
197 1.3.1 27.01.2013
198     Bugfix release
199     - Bug fixed: building libcds with boost versions before 1.48
200       Thanks Lucas Larsch who points me to this problem.
201   
202 1.3.0 29.12.2012
203     General release
204     1. Added: StripedSet, StripedMap - hash set and hash map 
205         implementation based on fine-grained lock-striping technique
206     2. Added: CuckooSet, CuckooMap - implementation of cuckoo hashing algorithm
207         based on fine-grained lock-striping technique
208     3. Added: SkipListSet, SkipListMap - implementation of lock-free skip list
209     4. Added: template <typename... Args> emplace(Args&&... args) member function 
210         for all containers in cds::container namespace. This function is available 
211         only if the compiler supports new C++11 features - variadic
212         templates and move semantics.
213     5. Changed: lambda functions are used internally instead of wrapping functors.
214         If the compiler does not support C++11 lambdas the old-style wrapping functors are used.
215     6. Changed: test projects has been splitted for optimizing compile time.
216     7. Breaking change: class cds::lock::Auto has been renamed to cds::lock::scoped_lock,
217         class cds::lock::AutoUnlock has been removed
218     8. Added: support for MinGW (tested with TDM-GCC 64bit, gcc 4.7)
219     
220 1.2.0 20.08.2012 (beta)
221     General release
222     1. Added: MichaelDeque - deque lock-free algo discovered by Maged Michael
223     2. Added: BasketQueue - Michael's queue modification discovered by Nir Shavit et al.
224     3. Added: support of Clang 3.0, 3.1 compiler (tested on Linux with boost 1.49)
225     4. Fixed: solving problem of 8-byte atomic data alignment on 32-bit platforms
226     5. Fixed bug 3536393: OptimisticQueue core dump 
227
228 1.1.0 17.04.2012 (beta)
229     General release
230     1. Added: C++11 atomic operations support. The library has been rewritten
231         for using std::atomic class and operations proposed in C++11 Standard.
232         If the compiler does not support the standard <atomic> library, 
233         own partial implementation declared in cds/cxx11_atomic.h is used. 
234         cxx11_atomic.h contains implementation for lock-free part of C++11 
235         <atomic> header needed for libcds.
236     2. Added: support for C++11 feature (if applicable):
237        - inline namespace (for GCC 4.4+)
238        - function =default and =delete specifiers (for GCC 4.4+)
239     3. Changed: the main reclamation cycle ("liberate" function) of cds::gc::PTB 
240        memory reclamation schema has been optimized. Previous implementation
241        could lead to unbounded memory consumption under high contention.
242     4. Changed: the internal structure of cds::intrusive::OptimisticQueue is greatly simplified. 
243        The interface of the class is slightly changed.
244     5. Fixed: some problem with cds::gc::HRC memory reclamation schema that
245        could be the cause of occasional program crash.
246     6. Fixed: an error in node reclamation algo in queue implementation (MSQueue, MoirQueue, 
247        OptimisticQueue). As an result of the error, some items could be lost with memory leaks.
248     7. Changed: cds::concept namespace and its content has been removed
249     8. Added support for Microsoft Visual C++ 11 Beta
250     9. Added support for GCC 4.7
251     
252 1.0.0  31.12.2011 (beta)
253     This version is completely rewritten to support intrusive version of lock-free containers
254     and more lightweight garbage collectors interface.
255     The class hierarchy and interfaces have been completely reimplemented from scratch.
256
257     1. Added: intrusive containers. Many lock-free containers in libcds have the intrusive
258        counterparts. The library is fully refactored to support intrusive containers.
259        Class hierarchy is changed: almost all non-intrusive container classes are based 
260        on their intrusive versions.
261        Two new namespace is added:
262         cds::intrusive - for intrusive containers
263         cds::container - for non-intrusive containers
264        Namespaces by container type (cds::queue, cds::map and so on) have been removed.
265     2. Added: New option-based approach is used for class declaration instead
266        old traits-based one. This approach allows to declare template arguments
267        in position-independent manner that is very useful for complex template declarations.
268        Option-based declarations use C++0x variadic templates if compiler supports it (GCC),
269        otherwise (MS VC) an emulation is used.
270     3. Changed: garbage collectors interface is generalized. cds::gc::GC (where GC is
271        one of HP, HRC, PTB) classes has been added.
272     4. Removed: tagged pointer GC. This GC
273        - unsafe for complex data structure
274        - x86-specific since it requires double-width CAS primitive
275        - memory-consuming since it requires separate free-list for each type stored in the containers
276     5. Default threading model is changed (see doc for cds::threading namespace):
277        - for Windows and MSVC++, CDS_THREADING_WIN_TLS is the default now
278        - for *nix and GCC, CDS_THREADING_PTHREAD is the default now
279     6. Added GCC 4.6 support (constexpr)
280     7. Added Microsoft Visual Studio 2010 (vc10) solution
281
282 0.8.0  28.03.2011 (beta)
283     1. Added: cds::Initialize and cds::Terminate functions that initializes and frees library's
284        internal structures.
285     2. Added: cds::memory::michael::Heap - Michael's lock-free allocator
286     3. Added: Exponential back-off strategy for spinning
287     4. Added: cds::queue::vyukov_mpmc_bounded - bounded queue
288        developed by Dmitry Vyukov (http://www.1024cores.net)
289     5. Added: support for FreeBSD amd64, x86
290
291 0.7.2  27.02.2011 (beta)
292     1. [Bug 3157201] Added implementation of threading manager based on Windows TLS API, see
293        cds::threading::wintls::Manager. Added CDS_THREADING_WIN_TLS macro. See docs for
294        cds::threading namespace for details.
295     2. Fixed bug in cds::threading::pthread::Manager: ptb_gc has not been initialized properly.
296     3. New function
297             template <typename T, typename FUNC>
298             bool erase( const key_type& key, T& dest, FUNC func ) ;
299        has been added to all map classes.
300     4. New function
301             template <typename T, typename FUNC>
302             bool insert( const key_type& key, T& val, FUNC func ) ;
303        has been added to all map classes.
304     5. Added new argument "bNew" to functor "func" of map's "ensure" member function:
305             void func( VALUE& itemValue, const VALUE& val, bool bNew ) ;
306         bNew = true if new item has been added
307         bNew = false if key is found
308     6. Fixed bug in cds::map::SplitOrderedList: LSB of dummy node's hash should be zero
309     7. Changed: thread liveliness checking on *nix has been changed to pthread_kill(id, 0).
310     8. Fixed: in map template member functions the functor may be passed by value
311        or by reference; use boost::ref( yourFunctor ) to pass your functor by reference
312     9. Fixed: cds::gc::tagged GC and all classes based on this GC has been rewritten
313        to solve stability problems.
314
315 0.7.1  30.12.2010 (beta)
316     1. [Bug 3130852] cds::queue::TZCyclicQueue::empty() has been corrected
317     2. [Bug 3128161] It seems, GCC 4.4 has a bug in __thread on x86 and x86_64. New "threading model"
318        CDS_THREADING_AUTODETECT has been added. See docs of cds::threading namespace for details
319     3. Fixed errors in the "Pass-the-Buck" garbage collector (namespace cds::gc::ptb)
320     4. [Bug 3128148] The code is aligned with the C++ standard (minor violations has been removed)
321     5. [Bug 3141654] missing break statement for atomic store - fixed
322     6. Added in-place scan strategy to cds::gc::hzp::GarbageCollector that does not allocate any memory.
323     7. Fixed bugs in HRC and tagged GC
324
325 0.7.0 05.12.2010 (beta)
326     1. Preliminary support for "Pass The Buck" memory manager is added. See cds::gc::ptb namespace.
327     2. Many part of library is rewritten to generalize the usage of various GCs
328     3. The new class cds::details::aligned_allocator has been added for allocating aligned memory
329        blocks. It is useful for Tagged Pointer memory reclamation schema (cds::gc::tagged_gc).
330     4. [Break change] New argument has been added to the member functions "ensure" and "find"
331        for ordered list and map classes
332     5. New member function "emplace" has been added to ordered list and map classes. This member function
333        allows change the value (or a part of it) of list/map item.
334     6. The internal structure of class cds::map::MichaelHashMap is completely refactored to support
335        cds::gc::no_gc correctly
336     7. The classes RecursiveSpinT, RecursiveSpin32, RecursiveSpin64, and RecursiveSpin from cds::lock
337        namespace have been renamed to ReentrantSpinT, ReentrantSpin32, ReentrantSpin64, and ReentrantSpin
338        respectively
339     8. Compiler support: GCC version below 4.3.0 is not supported
340     9. Fixed memory leak in cds::map::SplitOrderedList
341    10. Added compiler barrier to spin-lock release primitive for x86 and amd64
342    11. Makefile script is changed to resolve the problem when an user calls 'make clean' directly.
343        Thanks to Tamas Lengyel to point me to this bug.
344    12. The file dictionary.txt is excluded from distributive. This file is used for testing purposes only.
345        You may create dictionary.txt in this way:
346         cd ./tests/data
347         perl -X split.pl
348
349 0.6.0 26.03.2010 (beta)
350     1. The library is rewritten using atomic primitives with explicit memory ordering (based on C++
351        memory model proposal). The implementation of atomic primitives for supported architectures
352        is developed from scratch.
353     2. Total refactoring
354
355 0.5.0 31.12.2009  (beta)
356     First release