Age | Commit message (Collapse) | Author |
|
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
|
|
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.
|
|
* rickard/ethread-rewrite/OTP-8544:
Rewrite ethread library
|
|
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.
|
|
Merging the three off-heap lists (binaries, funs and externals) into
one list. This reduces memory consumption by two words (pointers) per
ETS object.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
erlang:system_info(multi_scheduling) sometimes erroneously returned enabled
when it should have returned blocked.
|
|
Alignment of scheduler data and run queues were adjusted.
|
|
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>.
|
|
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)
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
to not be allowed to garbage collect.
|
|
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.
|
|
erlang:system_flag(multi_scheduling, block | unblock) could
deadlock the runtime system.
|
|
erlang:system_flag(multi_scheduling, block | unblock) could
deadlock the runtime system.
|
|
when erlang:system_flag(multi_scheduling, block) was used.
Processes, and/or ports could get stuck on an offline scheduler
when schedulers online were reduced using
erlang:system_flag(schedulers_online, SchedulersOnline).
|
|
* egil/binary-gc:
Add documentation for binary heap size settings.
Add tracing capabilities for binary virtual heap
Add min heap size start options to beam and erl
Improve binary garbage collection
OTP-8370 The default settings for garbage collection of binaries has been
adjusted to be less aggressive than in R13B03. It is now also
possible configure the settings for binary GC. See the
documentation for spawn_opt/2-5, erlang:system_info/1,
erlang:system_flag/2, process_flag/2-3, erlang:trace/3, and the
documenation for erl for the new command line options +hms and
+hmbs.
|
|
The garbage collector in r13b03 is too aggressive in some cases. This
commit raises the level of default initial allowed binary garbage
(virtual heap for binaries) before collecting from 233 words to
46368 words (181 kB on 32-bit).
A new option, min_bin_vheap_size, has been added to spawn_opt,
system_flag and process_flag can be used to change the default values.
The option can also be used with system_info and process_info to
inspect the values.
For symmetry the option min_heap_size has been added to the above
functions where it was previously missing.
Add testcases for min_bin_vheap_size and min_heap_size for
functions process_flag/2, process_info/2, system_info/2 and
spawn_opt/2.
|
|
|
|
|