aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
AgeCommit message (Collapse)Author
2011-02-28Fixed end date in copyright note.Micael Karlberg
2011-02-10Verify that temp allocated memory is releasedRickard Green
2010-12-29Merge branch 'egil/timer-wheel-min-time/OTP-8990' into devBjörn-Egil Dahlberg
* egil/timer-wheel-min-time/OTP-8990: Teach timer-wheel slots to use double linked lists Remove timer-thread implementation Refactor timer interface Teach timer-wheel to keep min time
2010-12-20Refactor timer interfaceBjörn-Egil Dahlberg
2010-12-17Fix missed change of aux_work typeRickard Green
2010-12-17Merge branch 'rickard/ets-tab-delete/OTP-8999' into devRickard Green
* rickard/ets-tab-delete/OTP-8999: Safe deallocation of ETS-table structures Fix rwlock resource leak when hitting system limit Conflicts: erts/emulator/beam/erl_process.h erts/emulator/beam/erl_process.c
2010-12-16Use 32-bit atomics for misc scheduling specific informationRickard Green
2010-12-16Safe deallocation of ETS-table structuresRickard Green
Ensure that all threads potentially accessing an ETS-table have dropped all references to the table before deallocating it.
2010-12-15Use new atomic types in emulatorRickard Green
2010-12-01Merge branch 'rickard/load-balance-wrap/OTP-8950' into devRickard Green
* rickard/load-balance-wrap/OTP-8950: Prevent wrapping of values used during load balancing
2010-12-01Prevent wrapping of values used during load balancingRickard Green
Some integer values used during load balancing could under rare circumstances wrap causing a load unbalance between schedulers.
2010-11-18Merge branch 'rickard/cpu-groups/OTP-8861' into devRickard Green
* rickard/cpu-groups/OTP-8861: Generalize reader groups Move cpu topology functionality into erl_cpu_topology.[ch] Do not use more reader groups for schedulers than schedulers Conflicts: erts/emulator/beam/erl_init.c
2010-11-18Generalize reader groupsRickard Green
Reader groups have been generalized to cpu groups which can be used for implementing reader groups, but also for implementing other functionality in the future.
2010-11-18Move cpu topology functionality into erl_cpu_topology.[ch]Rickard Green
2010-11-18Merge branch 'rickard/sys_schedule_debug' into devRickard Green
* rickard/sys_schedule_debug: Verify that no outstanding I/O exist when checking for I/O in debug build
2010-11-18Verify that no outstanding I/O exist when checking for I/O in debug buildRickard Green
2010-11-18Merge branch 'rickard/sched-misc/OTP-8932' into devRickard Green
* rickard/sched-misc/OTP-8932: Fix erts_schedule_misc_op() so it can be called from arbitrary threads
2010-11-10Fix erts_schedule_misc_op() so it can be called from arbitrary threadsRickard Green
Tracing to port could cause an emulator crash when unloading the trace driver.
2010-10-07Fix newly introduced halfword emulator bugsRickard Green
2010-09-04Add scheduler wakup threshold as command line argumentRickard Green
The scheduler wakeup threshold is now possible to adjust at system boot. For more information see the `+swt' command line argument of `erl'.
2010-09-04Lower the scheduler wakeup thresholdRickard Green
Lower the scheduler wakeup threshold since schedulers aren't spuriously woken as before (since commit 59ee2a593090e7d53c97ceba63cbd300d1b9657e).
2010-09-01Fix crash when calling erlang:system_info(update_cpu_info)Rickard Green
Calling erlang:system_info(update_cpu_info) on platforms where no CPU topology was found could result in a crash if other CPU information had changed. This bug was introduced in the 'dev' branch before R14B (commit 1b273b618002d65159453fdfb9520a9476e4423a). That is, the bug has never been seen in a released runtime system.
2010-08-31Merge branch 'rickard/cpu-info-unbind/8765' into devRickard Green
* rickard/cpu-info-unbind/8765: Fix erroneous error reports about unbind failure
2010-08-31Fix erroneous error reports about unbind failureRickard Green
On platforms where binding of schedulers is not supported, numerous error reports on the form "Scheduler <N> failed to unbind from cpu -1: enotsup" were erroneously issued. This bug was introduced in the 'dev' branch before R14B (commit 1b273b618002d65159453fdfb9520a9476e4423a). That is, the bug has never been seen in a released runtime system. Reported-By: Tuncer Ayaz
2010-08-30Merge branch 'egil/R14A/binary-gc-wrap/OTP-8730' into devPatrik Nyblom
* egil/R14A/binary-gc-wrap/OTP-8730: Increase vheap counter to Uint64 Fix wrapping in next vheap calculation
2010-08-30Merge branch 'rickard/cpu-info/OTP-8765' into devRickard Green
* rickard/cpu-info/OTP-8765: Initialize environment functionality after thread lib Fix faulty assertions Implement automatic detection of CPU topology on Windows Make it possible to reread and update detected CPU information
2010-08-18Make it possible to reread and update detected CPU informationRickard Green
Calling erlang:system_info/1 with the new argument 'update_cpu_info' will make the runtime system reread and update the internally stored CPU information. For more information see the documentation of erlang:system_info(update_cpu_info).
2010-08-12Increase vheap counter to Uint64Björn-Egil Dahlberg
This will reduce the risk of integer wrapping in bin vheap counting. The vheap size series will now use the golden ratio instead of doubling and fibonacci sequences. OTP #8730
2010-08-11Fix faulty no_empty_run_queues assertionRickard Green
For a short period of time no_empty_run_queues may have been increased twice for a specific run queue. Two assertions did not take this into account.
2010-08-10Merge branch 'rickard/ethread-rewrite/OTP-8544' into devRickard Green
* rickard/ethread-rewrite/OTP-8544: Rewrite ethread library
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-07-20One off-heap list, to eliminate two words per ETS object.Sverker Eriksson
Merging the three off-heap lists (binaries, funs and externals) into one list. This reduces memory consumption by two words (pointers) per ETS object.
2010-06-14OTP-8710 Fix emulator crash caused by setting CPU topologyRickard Green
A user defined CPU topology set via a call to <seealso marker="erlang#system_flag_cpu_topology">erlang:system_flag(cpu_topology, CPUTopology)</seealso> was not properly verified, and could in worst case cause an emulator crash. The emulator crash could only occur when a user defined CPU topology already existed and was redefined.
2010-06-07Merge OTP-8681Björn-Egil Dahlberg
2010-06-03Teach call_time trace to use intruction pointersBjörn-Egil Dahlberg
call_time trace will use instruction pointers instead of breakpoint data pointers. More costly lookup but the bdt structure might be deallocated, we do not want that. Remove unnecessary pattern lock.
2010-06-03Add return_time trace and PSD deletionsBjörn-Egil Dahlberg
2010-06-03Fix lock-checking for PSD call_time breakpointsBjörn-Egil Dahlberg
2010-06-03OTP-8675 Fix erroneous return value from erlang:system_info(multi_scheduling)Rickard Green
erlang:system_info(multi_scheduling) sometimes erroneously returned enabled when it should have returned blocked.
2010-06-03OTP-8673 Adjust alignment of scheduler data and run queuesRickard Green
Alignment of scheduler data and run queues were adjusted.
2010-06-03OTP-8666 Enable automatic binding of schedulers when possibleRickard Green
The runtime system will by default bind schedulers to logical processors using the default_bind bind type if the amount of schedulers are at least equal to the amount of logical processors configured, binding of schedulers is supported, and a CPU topology is available at startup. NOTE: If the Erlang runtime system is the only operating system process that binds threads to logical processors, this improves the performance of the runtime system. However, if other operating system processes (as for example another Erlang runtime system) also bind threads to logical processors, there might be a performance penalty instead. If this is the case you, are are advised to unbind the schedulers using the <seealso marker="erl#+sbt">+sbtu</seealso> command line argument, or by invoking <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(schedule r_bind_type, unbound)</seealso>.
2010-06-03OTP-8555 Send message from NIFSverker Eriksson
New NIF features: Send messages from a NIF, or from thread created by NIF, to any local process (enif_send) Store terms between NIF calls (enif_alloc_env, enif_make_copy) Create binary terms with user defined memory management (enif_make_resource_binary)
2010-03-10Teach {wordsize,internal|external} to system_info/1Patrik Nyblom
Some test suites need to differentiate between 32-bit terms and 32-bit pointers. While at it, remove some more warnings in process.c for SMP and debug.
2010-03-10Turn on instruction packing in the loader and virtual machinePatrik Nyblom
2010-03-10Add the BeamInstr data type for loaded BEAM codePatrik Nyblom
For cleanliness, use BeamInstr instead of the UWord data type to any machine-sized words that are used for BEAM instructions. Only use UWord for untyped words in general.
2010-03-10Store pointers to heap data in 32-bit wordsPatrik Nyblom
Store Erlang terms in 32-bit entities on the heap, expanding the pointers to 64-bit when needed. This works because all terms are stored on addresses in the 32-bit address range (the 32 most significant bits of pointers to term data are always 0). Introduce a new datatype called UWord (along with its companion SWord), which is an integer having the exact same size as the machine word (a void *), but might be larger than Eterm/Uint. Store code as machine words, as the instructions are pointers to executable code which might reside outside the 32-bit address range. Continuation pointers are stored on the 32-bit stack and hence must point to addresses in the low range, which means that loaded beam code much be placed in the low 32-bit address range (but, as said earlier, the instructions themselves are full words). No Erlang term data can be stored on C stacks (enforced by an earlier commit). This version gives a prompt, but test cases still fail (and dump core). The loader (and emulator loop) has instruction packing disabled. The main issues has been in rewriting loader and actual virtual machine. Subsystems (like distribution) does not work yet.
2010-03-10Fit all heap data into the 32-bit address rangePatrik Nyblom
This is the first step in the implementation of the half-word emulator, a 64-bit emulator where all pointers to heap data will be stored in 32-bit words. Code specific for this emulator variant is conditionally compiled when the HALFWORD_HEAP define has a non-zero value. First force all pointers to heap data to fall into a single 32-bit range, but still store them in 64-bit words. Temporary term data stored on C stack is moved into scheduler specific storage (allocated as heaps) and macros are added to make this happen only in emulators where this is needed. For a vanilla VM the temporary terms are still stored on the C stack.
2010-02-10OTP-8420 Fix processes in exiting status that are about to be scheduled,Björn-Egil Dahlberg
to not be allowed to garbage collect.
2010-02-08Add runtime option to enable/disable lcnt statsBjörn-Egil Dahlberg
Add erts_debug:lock_counters({copy_save, bool()}). This option enables or disables statistics saving for destroyed processes and ets-tables. Enabling this might consume a lot of memory. Add id-numbering for lock classes which is otherwise undefined.
2010-02-03OTP-8386 Immediately repeated multi-scheduling block/unblock cycles usingRickard Green
erlang:system_flag(multi_scheduling, block | unblock) could deadlock the runtime system.
2010-01-22OTP-8386 Immediately repeated multi-scheduling block/unblock cycles usingRickard Green
erlang:system_flag(multi_scheduling, block | unblock) could deadlock the runtime system.