aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2018-03-21Merge pull request #1740 from rickard-green/rickard/signals/OTP-14589Rickard Green
Implementation of true asynchronous signaling between processes
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
Communication between Erlang processes has conceptually always been performed through asynchronous signaling. The runtime system implementation has however previously preformed most operation synchronously. In a system with only one true thread of execution, this is not problematic (often the opposite). In a system with multiple threads of execution (as current runtime system implementation with SMP support) it becomes problematic. This since it often involves locking of structures when updating them which in turn cause resource contention. Utilizing true asynchronous communication often avoids these resource contention issues. The case that triggered this change was contention on the link lock due to frequent updates of the monitor trees during communication with a frequently used server. The signal order delivery guarantees of the language makes it hard to change the implementation of only some signals to use true asynchronous signaling. Therefore the implementations of (almost) all signals have been changed. Currently the following signals have been implemented as true asynchronous signals: - Message signals - Exit signals - Monitor signals - Demonitor signals - Monitor triggered signals (DOWN, CHANGE, etc) - Link signals - Unlink signals - Group leader signals All of the above already defined as asynchronous signals in the language. The implementation of messages signals was quite asynchronous to begin with, but had quite strict delivery constraints due to the ordering guarantees of signals between a pair of processes. The previously used message queue partitioned into two halves has been replaced by a more general signal queue partitioned into three parts that service all kinds of signals. More details regarding the signal queue can be found in comments in the erl_proc_sig_queue.h file. The monitor and link implementations have also been completely replaced in order to fit the new asynchronous signaling implementation as good as possible. More details regarding the new monitor and link implementations can be found in the erl_monitor_link.h file.
2018-03-20Merge pull request #1705 from eltex-ecss/group_exit_signalHans Nilsson
kernel: in the group added processing of 'EXIT' signal from shell OTP-14991
2018-03-20Merge pull request #1742 from michalmuskala/code-ensure-loadedDan Gudmundsson
Short-circuit code:ensure_loaded for already-loaded modules
2018-03-20Merge pull request #1748 from fenollp/more-typosHans Bolinder
More typos
2018-03-19Fix file:change_group/change_ownerJohn Högberg
It wasn't possible to change group/owner separately, and our test suite lacked coverage for that. ERL-589
2018-03-16more-typos: s%follwing%following%gPierre Fenoll
2018-03-14Merge branch 'maint'Henrik
Conflicts: OTP_VERSION
2018-03-13Merge branch 'sverker/send-tick/OTP-14681'Sverker Eriksson
* sverker/send-tick/OTP-14681: kernel: Fix and improve send_tick logic
2018-03-13Merge branch 'sverker/dict-put-immed-opt/OTP-14976'Sverker Eriksson
* sverker/dict-put-immed-opt: erts: Optimize erlang:put/2 for hash collision lists erts: Optimize erlang:put/2 for immed values erts: Refactor erlang:put/2
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson
2018-03-09Update release notesErlang/OTP
2018-03-09Update version numbersErlang/OTP
2018-03-07Short-circuit code:ensure_loaded for already-loaded modulesMichał Muskała
This checks if the module is already loaded using erlang:module_loaded before calling the code server. This should improve performance of the call significantly since the case where module is already loaded is the common one. The change shouldn't cause any problems. It's worth noting that code:ensure_modules_loaded already does a similar check.
2018-03-06Merge branch 'raimo/stop-encouraging-v4-mapped/ERL-503/OTP-13716'Raimo Niskanen
* raimo/stop-encouraging-v4-mapped/ERL-503/OTP-13716: Stop translating V4MAPPED addresses Stop returning V4MAPPED addresses Implement function for IPv4-mapped IPv6 addresses
2018-03-06Merge remote-tracking branch 'origin/hasse/kernel/rpc_doc_fix/OTP-10551'Hans Bolinder
* origin/hasse/kernel/rpc_doc_fix/OTP-10551: kernel: Improve docs of rpc:multicall/5
2018-03-02kernel,stdlib: Remove obsolete use of send with 'noconnect'Sverker Eriksson
as workarounds to avoid blocking auto-connect, which is now asynchronous in OTP-21. Also changed old catch to more efficient try-catch.
2018-03-02erts,kernel: Add dist_util:strict_order_flags/0Sverker Eriksson
to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency.
2018-03-02kernel: Remove DFLAGS_ALL from dist.hrlSverker Eriksson
and remove use in dist_util:check_mandatory
2018-03-02kernel: Simplify dist flags handshake mergingSverker Eriksson
to a simple 'band' operation into ChosenFlags and no need to remember old 'this_flags' and 'other_flags'.
2018-03-02erts,kernel: Add erts_internal:get_dflags/0Sverker Eriksson
for kernel to ask erts about distribution flags and keep this info in one place.
2018-03-02kernel: Remove redundant codeSverker Eriksson
No need to clear them as they cannot be set.
2018-03-02Merge branch 'maint'Lukas Larsson
2018-03-01kernel: Fix handling of os:cmd option max_size in winLukas Larsson
2018-02-28Merge branch 'john/erts/allow-opening-device-files/OTP-11462'John Högberg
* john/erts/allow-opening-device-files/OTP-11462: Allow opening device files and FIFOs with file:open/2
2018-02-28Merge branch 'maint'John Högberg
* maint: Skip testing unavailable interfaces in inet_SUITE:getifaddrs Make re_SUITE:sub_binaries less unstable
2018-02-27kernel: Improve docs of rpc:multicall/5Hans Bolinder
2018-02-27Skip testing unavailable interfaces in inet_SUITE:getifaddrsJohn Högberg
This test consistently failed on Windows when an interface was enabled but unplugged, as the interface was 'up' but not 'running'.
2018-02-26Merge branch 'maint'Lukas Larsson
2018-02-26Merge branch 'lukas/kernel/dist_SUITE_corefile_ignore' into maintLukas Larsson
* lukas/kernel/dist_SUITE_corefile_ignore: kernel: Ignore cores in erl_distribution_SUITE
2018-02-26Allow opening device files and FIFOs with file:open/2John Högberg
To the best of our knowledge this was introduced since file operations on device files/FIFO:s could hang the emulator forever back when the emulator was single-threaded and lacked IO threads; a read operation could block all progress preventing the write operation it waited for from occurring. Granted, this could still happen through starving all dirty IO schedulers, but the same issue can arise with NFS files which we've always allowed. Removing this restriction also lets us remove a stat(2) call that was added to specifically allow `/dev/null`.
2018-02-22Stop translating V4MAPPED addressesRaimo Niskanen
2018-02-21erts: Optimize erlang:put/2 for immed valuesSverker Eriksson
Do destructive write of immed value if key exists. This is an optimization at the expense of get/0 which must now copy all (mutable) key-value tuples.
2018-02-20Merge branch 'maint'Sverker Eriksson
2018-02-15kernel: Reject load of module names with slashSverker Eriksson
or backslash on Windows. Purpose: Prevent tricks to get hostile code running.
2018-02-13Merge branch 'maint'Sverker Eriksson
* maint: Updated OTP version Update release notes Update version numbers kernel: Add os:cmd/2 with max_size option # Conflicts: # OTP_VERSION # lib/kernel/doc/src/os.xml # lib/kernel/src/os.erl
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-13Stop returning V4MAPPED addressesRaimo Niskanen
2018-02-12Update release notesErlang/OTP
2018-02-12Update version numbersErlang/OTP
2018-02-07Merge branch 'hasse/no_get_stacktrace/OTP-14861'Hans Bolinder
* hasse/no_get_stacktrace/OTP-14861: erts: Update abstract format doc with stacktrace variable wx: Do not call erlang:get_stacktrace() tools: Do not call erlang:get_stacktrace() stdlib: Do not call erlang:get_stacktrace() sasl: Do not call erlang:get_stacktrace() runtime_tools: Do not call erlang:get_stacktrace() reltool: Do not call erlang:get_stacktrace() parsetools: Do not call erlang:get_stacktrace() observer: Do not call erlang:get_stacktrace() mnesia: Do not call erlang:get_stacktrace() (cont) mnesia: Do not call erlang:get_stacktrace() kernel: Do not call erlang:get_stacktrace() inets: Do not call erlang:get_stacktrace() eunit: Do not call erlang:get_stacktrace() et: Do not call erlang:get_stacktrace() dialyzer: Do not call erlang:get_stacktrace() debugger: Do not call erlang:get_stacktrace() debugger: Do not try to restore stacktrace common_test: Do not call erlang:get_stacktrace()
2018-02-05kernel: Do not call erlang:get_stacktrace()Hans Bolinder
2018-02-02kernel: in the group added processing of 'EXIT' signal from shell in case of ↵Anton Ryabkov
the group leader is waiting data from IO driver
2018-02-02Reword docs related to the runtime system modeXavier Noria
The existing wording may be interpreted as saying that embedded mode eager loads all modules. This revision makes clear embedded mode only disables module auto loading. Since I was on it, I have reordered a couple of places to describe interactive first, and then embedded. It feels natural to cover first the default and positive mode (auto loads), and then its negation.
2018-01-29make HiPE work on x86_64 when PIE is enabledbhuztez
Currently HiPE amd64 assumes the runtime system code is loaded into the low 2G of the address space. However, this is not the case when PIE is enabled, it is loaded into a random location. So trampolines are required to call BIFs, and also we have first to load the address of sse2_fnegate_mask to a regisiter before xorpd in fchs.
2018-01-26Implement function for IPv4-mapped IPv6 addressesRaimo Niskanen
2018-01-24Merge branch 'maint'Sverker Eriksson
2018-01-24Merge branch 'sverker/hipe-load-fixing/OTP-14891' into maintSverker Eriksson
2018-01-24kernel: Ignore cores in erl_distribution_SUITELukas Larsson
Some bash versions segfault when a unicode argument is given so we ignore cores created by nodes spawned by this testcase.
2018-01-23Merge branch 'maint'Hans Bolinder
* maint: kernel: Correct contracts and a bug in group_history stdlib: Correct contracts dialyzer: Optimize handling of a lot of warnings Conflicts: lib/kernel/src/erl_boot_server.erl