aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_threads.h
AgeCommit message (Collapse)Author
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-21Merge branch 'rickard/thread-queue-fix/OTP-10854' into ↵Rickard Green
rickard/r16b/thread-queue-fix/OTP-10854 Conflicts: erts/emulator/beam/erl_threads.h
2013-02-18Add atomic dirty read and dirty set operationsRickard Green
2012-12-11Fix bit set op of non-atomic fallback in atomic APIRickard Green
2012-12-03Atomic port stateRickard Green
2012-04-16Optimize process table accessRickard Green
2012-02-19Misc memory barrier fixesRickard Green
- Document barrier semantics - Introduce ddrb suffix on atomic ops - Barrier macros for both non-SMP and SMP case - Make the thread progress API a bit more intuitive
2011-11-13Use critical sections as mutex implementation on WindowsRickard Green
Windows native critical sections are now used internally in the runtime system as mutex implementation. This since they perform better under extreme contention than our own implementation.
2011-11-13Optimize memory allocationRickard Green
A number of memory allocation optimizations have been implemented. Most optimizations reduce contention caused by synchronization between threads during allocation and deallocation of memory. Most notably: * Synchronization of memory management in scheduler specific allocator instances has been rewritten to use lock-free synchronization. * Synchronization of memory management in scheduler specific pre-allocators has been rewritten to use lock-free synchronization. * The 'mseg_alloc' memory segment allocator now use scheduler specific instances instead of one instance. Apart from reducing contention this also ensures that memory allocators always create memory segments on the local NUMA node on a NUMA system.
2011-10-14Merge branch 'rickard/atomics-api/OTP-9014' and OTP_R14B04Rickard Green
Conflicts: erts/aclocal.m4 erts/emulator/beam/erl_db.c erts/emulator/sys/win32/sys.c erts/include/internal/ethread_header_config.h.in
2011-06-14Use new atomic API in runtime systemRickard Green
All uses of the old deprecated atomic API in the runtime system have been replaced with the use of the new atomic API. In a lot of places this change imply a relaxation of memory barriers used.
2011-06-14Improve ethread atomicsRickard Green
The ethread atomics API now also provide double word size atomics. Double word size atomics are implemented using native atomic instructions on x86 (when the cmpxchg8b instruction is available) and on x86_64 (when the cmpxchg16b instruction is available). On other hardware where 32-bit atomics or word size atomics are available, an optimized fallback is used; otherwise, a spinlock, or a mutex based fallback is used. The ethread library now performs runtime tests for presence of hardware features, such as for example SSE2 instructions, instead of requiring this to be determined at compile time. There are now functions implementing each atomic operation with the following implied memory barrier semantics: none, read, write, acquire, release, and full. Some of the operation-barrier combinations aren't especially useful. But instead of filtering useful ones out, and potentially miss a useful one, we implement them all. A much smaller set of functionality for native atomics are required to be implemented than before. More or less only cmpxchg and a membar macro are required to be implemented for each atomic size. Other functions will automatically be constructed from these. It is, of course, often wise to implement more that this if possible from a performance perspective.
2011-06-13Do not abort emulator when buggy pthread impl return EBUSYRickard Green
2011-02-25Merge branch 'rickard/mtx-destroy-ebusy/OTP-9009' into devRickard Green
* rickard/mtx-destroy-ebusy/OTP-9009: Send warning instead of abort on EBUSY from pthread_mutex_destroy
2011-02-25Send warning instead of abort on EBUSY from pthread_mutex_destroyRickard Green
Due to a bug in glibc the runtime system could abort while trying to destroy a mutex. The runtime system will now issue a warning instead of aborting.
2011-02-25Simplify erts_poll_wait() wakeup logicRickard Green
2010-12-16Add 32-bit atomics to emulator APIsRickard Green
2010-12-15Use new atomic types in emulatorRickard Green
2010-12-14Remove unused ethread time functionalityRickard Green
2010-11-18Move cpu topology functionality into erl_cpu_topology.[ch]Rickard Green
2010-08-10Rewrite ethread libraryRickard Green
Large parts of the ethread library have been rewritten. The ethread library is an Erlang runtime system internal, portable thread library used by the runtime system itself. Most notable improvement is a reader optimized rwlock implementation which dramatically improve the performance of read-lock/read-unlock operations on multi processor systems by avoiding ping-ponging of the rwlock cache lines. The reader optimized rwlock implementation is used by miscellaneous rwlocks in the runtime system that are known to be read-locked frequently, and can be enabled on ETS tables by passing the `{read_concurrency, true}' option upon table creation. See the documentation of `ets:new/2' for more information. The ethread library can now also use the libatomic_ops library for atomic memory accesses. This makes it possible for the Erlang runtime system to utilize optimized atomic operations on more platforms than before. Use the `--with-libatomic_ops=PATH' configure command line argument when specifying where the libatomic_ops installation is located. The libatomic_ops library can be downloaded from: http://www.hpl.hp.com/research/linux/atomic_ops/ The changed API of the ethread library has also caused modifications in the Erlang runtime system. Preparations for the to come "delayed deallocation" feature has also been done since it depends on the ethread library. Note: When building for x86, the ethread library will now use instructions that first appeared on the pentium 4 processor. If you want the runtime system to be compatible with older processors (back to 486) you need to pass the `--enable-ethread-pre-pentium4-compatibility' configure command line argument when configuring the system.
2010-06-07Merge OTP-8681Björn-Egil Dahlberg
2010-06-01OTP-8658 Add missing memory barriers in erts_poll()Rickard Green
Missing memory barriers in erts_poll() could cause the runtime system to hang indefinitely.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP