aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-11-05Prepare releaseErlang/OTP
2018-11-05Merge branch 'john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371' into maint-20Erlang/OTP
* john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs
2018-11-05Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-11-02Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-11-02Merge branch 'maint'John Högberg
* maint: Optimize operator '--' and yield on large inputs Inline erts_cmp Clarify a magical allocation size Fix trapping in lists:reverse/2
2018-11-02Merge branch 'john/erts/minusminus_trapping/OTP-15371' into maintJohn Högberg
* john/erts/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs Inline erts_cmp Clarify a magical allocation size Fix trapping in lists:reverse/2
2018-11-01Merge branch 'sverker/enif-cancel-select/OTP-15095'Sverker Eriksson
* sverker/enif-cancel-select/OTP-15095: erts: Bump erl_nif minor version and ERL_NIF_MIN_ERTS_VERSION
2018-11-01erts: Bump erl_nif minor version and ERL_NIF_MIN_ERTS_VERSIONSverker Eriksson
with ticket syntax.
2018-11-01erts: Tidy some ordered_set iteration codeSverker Eriksson
with variable name changes, some comments and moved catree_find_prev_from_pb_key_root after its twin.
2018-11-01erts: Fix bug for catree iterationSverker Eriksson
with keys containing off-heap terms. The passed key may actually be the one already saved (if nodes have been joined), in which case we do nothing. Calling destroy_route_key() may destroy off-heap data.
2018-11-01Merge branch 'maint'Rickard Green
* maint: Updated OTP version Prepare release
2018-11-01Merge branch 'maint-20' into maintRickard Green
* maint-20: Updated OTP version Prepare release
2018-11-01Merge branch 'maint'Rickard Green
* maint: Fix erts_internal_ref_number_cmp()
2018-11-01Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maintRickard Green
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
2018-10-31Prepare releaseErlang/OTP
2018-10-31Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maint-20Erlang/OTP
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
2018-10-31Merge PR-1997 from sverker/erts/ordered_set-select-improvements/OTP-15325Sverker Eriksson
Even more scalable ETS ordered_set with write_concurrency
2018-10-31Fix erts_internal_ref_number_cmp()Rickard Green
2018-10-29Refactor releasing of literalsBjörn Gustavsson
Introudce erts_queue_release_literals() to queue a literal area to be released.
2018-10-29Merge branch 'maint'Rickard Green
* maint: Updated OTP version Prepare release
2018-10-29Merge branch 'maint-18' into maintRickard Green
* maint-18: Updated OTP version Prepare release
2018-10-29Merge branch 'maint'Lukas Larsson
2018-10-29Merge pull request #1977 from RogierWV/maint/OTP-15389Lukas Larsson
Fix run_erl.c so it compiles on Solaris
2018-10-29Merge branch 'maint'Lukas Larsson
2018-10-29Merge branch 'jimdigriz/os_mon/fix_cpu_sup_android/OTP-15387' into maintLukas Larsson
* jimdigriz/os_mon/fix_cpu_sup_android/OTP-15387: Make Erlang's cpu_sup function better on Android SELinux is another cause of MSG_CTRUNC
2018-10-29Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-10-26Prepare releaseErlang/OTP
2018-10-26erts: Remove lock ordering of catree base nodesSverker Eriksson
We no longer lock more than one base node at a time. We do however trylock a second base node at join.
2018-10-26erts: Let lock checker allow trylock of same orderSverker Eriksson
for different lock instances.
2018-10-26erts: Fix bug in lock checker for term comparisonSverker Eriksson
2018-10-26erts: Join empty base nodes in catreeSverker Eriksson
The original implementation did not do this due to fear of bad performance. But we think the negative effect of "leaking" empty base nodes is more important to fix. To get the bad performance a special kind of access patterns is needed where base nodes are frequently emptied and then repopulated soon again. ets_SUITE:throughput_benchmark for example did not show any negative effect from this commit at all.
2018-10-26Inline erts_cmpJohn Högberg
This greatly increases the performance of '--'/2 which does a lot of term comparisons.
2018-10-25Clarify a magical allocation sizeDmytro Lytovchenko
2018-10-25Fix trapping in lists:reverse/2John Högberg
The first stage wasn't bounded by reductions, and it bumped far more reductions than it should have due to a logic bug.
2018-10-24Extend the sharing-preserving routines to optionally copy literalsBjörn Gustavsson
In the implementation of the zero-copying term storage, we want to preserve sharing, but not copy literals because the modules holding the literals could be unloaded under our feet.
2018-10-24Merge branch 'maint'Björn Gustavsson
* maint: beam_lib: Remove obsolete module() from the beam() type hipe: Don't use beam_lib:info/1 with an atom as filename Honor the max heap size when copying literals after purging
2018-10-24Merge pull request #1991 from bjorng/bjorn/erts/fix-max_heap_size/OTP-15360Björn Gustavsson
Honor the max heap size when copying literals after purging
2018-10-23erts: Refactor DbUpdateHandle with nicer typesSverker Eriksson
2018-10-23erts: Refactor away function generating macros in erl_db_catree.cSverker Eriksson
Easier to read and debug, and about the same lines of code.
2018-10-23erts: Fix faulty assert in catree_find_nextprev_rootSverker Eriksson
It's possible to first find an empty base node and then retry and find the same base node as invalid. It's a benign race with join which first makes the old invalid 'neighbor' accessible from 'gparent' before replacing it with 'new_neighbor'.
2018-10-23erts: Provoke random catree split/join for DEBUG emulatorSverker Eriksson
2018-10-23erts: Fix slot bug in find_next/prevSverker Eriksson
2018-10-23erts: Fix lc_key in base nodesSverker Eriksson
to actually pass the copy to lock checker.
2018-10-23erts: Do contention adaptions during (updating) iterationsSverker Eriksson
Once an iteration key has been found, never fall back to first/last key in next/prev tree as trees may split or join under our feet. I.e we must always use previous key when searching for the next key.
2018-10-23erts: Optimize find_next/prev_from_pb_keySverker Eriksson
to not have to backtrack up on the stack.
2018-10-23erts: Add erts_debug feature 'ets_force_split'Sverker Eriksson
to easier generate a routing tree for test without having to spend cpu to provoke actual repeated lock conflicts.
2018-10-23erts: Implement ets:info(T, stats) for catreesSverker Eriksson
{RouteNodes, BaseNodes, MaxRouteTreeDepth}
2018-10-22Merge branch 'maint'Raimo Niskanen
Conflicts: erts/preloaded/ebin/prim_inet.beam
2018-10-22Merge branch 'raimo/tcp-close-while-send/maint/ERL-561/OTP-12242' into maintRaimo Niskanen
* raimo/tcp-close-while-send/maint/ERL-561/OTP-12242: Write test case Fix hanging gen_tcp send vs close race Conflicts: erts/preloaded/ebin/prim_inet.beam
2018-10-19erts: Remove dead tree merging codeSverker Eriksson