aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-12-06Merge branch 'lukas/OTP-21.1.1/scheduler_pollset/OTP-15475' into maintLukas Larsson
* lukas/OTP-21.1.1/scheduler_pollset/OTP-15475: erts: Move fds with active true behaviour to own pollset erts: Fix lists_member_2 reduction count erts: Allow code_model_small to be set in xcomp setting erts: Implement delay_send using timer instead of poll erts: Optimize driver_set_timer(0) to fire at once erts: Optimize the inet driver multi timers for one timer erts: Move all inet tcp CONNECTED timers to multi timer erts: Add erts_io_notify_port_task_executed to check_io msacc state erts: Add pre-alloc to ALLOC msacc state erts: Make thr prgr wakeup current or sched 1 erts: Pass thread progress data where possible
2018-12-06erts: Move fds with active true behaviour to own pollsetLukas Larsson
At start of the VM a poll-set that the schedulers will check is created where fds that have triggered many (at the moment, many means 10) times without being deselected inbetween. In this scheduler specific poll-set fds do not use ONESHOT, which means that the number of syscalls goes down dramatically for such fds. This pollset is introduced in order to handle fds that are used by the erlang distribution and that never change their state from {active, true}. This pollset only handles ready_input events, ready_output is still handled by the poll threads. During overload, polling the scheduler poll-set is done on a 10ms timer.
2018-12-05Merge pull request #2039 from ↵Lukas Larsson
garazdawi/lukas/erts/fix_lit_msg_copy_in_gc/ERL-741/OTP-15478 erts: Fix copy of literal msg during gc
2018-12-04erts: Fix copy of literal msg during gcLukas Larsson
A copy has to be made of the message as there is a trace token. There was a bug where the actual message was incorrectly modified even if it was a literal.
2018-12-03Update preloaded modulesHenrik Nord
2018-12-03Merge branch 'lukas/erts/CFLAGS-O-check/OTP-15465' into maintLukas Larsson
* lukas/erts/CFLAGS-O-check/OTP-15465: erts: Fix some 32-bit gcc warnings erts: Add check that a -O flag is present in CFLAGS
2018-12-03erts: Fix some 32-bit gcc warningsLukas Larsson
2018-12-03erts: Add check that a -O flag is present in CFLAGSLukas Larsson
There have been too many times when users have needed to enable something through CFLAGS but forgotten to add the '-O2 -g' flags.
2018-12-03erts: Fix lists_member_2 reduction countLukas Larsson
OTP-15474
2018-12-03erts: Allow code_model_small to be set in xcomp settingLukas Larsson
OTP-15473
2018-12-03erts: Implement delay_send using timer instead of pollLukas Larsson
The previous implementation uses a round-trip in the poll-set to simulate a yield of the port context. With the poll thread implementation this is no longer a good idea as it generated a lot more work for the system. So this commit changes the implementation to use a timer instead. OTP-15471
2018-12-03erts: Optimize driver_set_timer(0) to fire at onceLukas Larsson
By optimizing driver_set_timer for 0 we can use it instead of select to do a yield in the driver. Use full for delay_send in the inet driver. OTP-15472
2018-12-03erts: Optimize the inet driver multi timers for one timerLukas Larsson
The most common case for any socket is to have zero or one timer, so we optimize for the one case. The only case when we have more than one timer is when the multi accept feature is used.
2018-12-03erts: Move all inet tcp CONNECTED timers to multi timerLukas Larsson
2018-12-03erts: Add erts_io_notify_port_task_executed to check_io msacc stateLukas Larsson
OTP-15450
2018-12-03erts: Add pre-alloc to ALLOC msacc stateLukas Larsson
OTP-15450
2018-12-03Merge branch 'sverker/erts/sendfile-error-bug/ERL-784/OTP-15461' into maintSverker Eriksson
* sverker/erts/sendfile-error-bug/ERL-784/OTP-15461: erts: Fix hanging sendfile bugs when socket closes unexpectedly erts: Fix unexpected inet_reply message from failing file:sendfile erts: Fix bug in sendfile for active socket
2018-12-03Merge branch 'sverker/erts/cuddle-driver_SUITE' into maintSverker Eriksson
* sverker/erts/cuddle-driver_SUITE: erts: Fix faulty assert in driver_SUITE erts: Improve driver_SUITE:smp_select
2018-11-30erts: Fix hanging sendfile bugs when socket closes unexpectedlySverker Eriksson
2018-11-29Replace mathematical jargon in erl_nif docs PR-2037Bartosz Błaszków
2018-11-28erts: Fix unexpected inet_reply message from failing file:sendfileSverker Eriksson
A failing file:sendfile call would often send a message {inet_reply, Port, {error, Reason}} that would pollute the mailbox of the calling process. TCP_REQ_SENDFILE has its own reply messages format {sendfile, _, _} and does not expect an inet_reply message. Solution: Suppress inet_reply error message if TCP_ADDF_SENDFILE is set.
2018-11-28erts: Fix bug in sendfile for active socketSverker Eriksson
driver_select() was called after port had been killed by tcp_inet_sendfile() calling tcp_send_error().
2018-11-27Merge branch 'lukas/erts/fix-msacc-gc-states/OTP-15450' into maintLukas Larsson
* lukas/erts/fix-msacc-gc-states/OTP-15450: erts: Fix msacc GC states on dirty scheds
2018-11-27Merge pull request #2024 from max-au/fix_aux_work_on_dcpu_schedJohn Högberg
erts: fix attempt to start timer when executing on dirty scheduler OTP-15446
2018-11-26erts: fix attempt to start timer when executing on dirty schedulerMaxim Fedorov
Since OTP R20, there is a possibility for MAJOR garbage collection to run on dirty scheduler. So DistEntry destructor is being called on dirty scheduler as well. This, in turn, leads to an attempt to schedule timer on a dirty scheduler too, which is impossible (and will assert on debug build, but does succeed for release build, creating an infinite busy loop, since aux work wakes scheduler up, but dirty scheduler cannot execute aus work). There is a similar method in erl_hl_timer, see erts_start_timer_callback.
2018-11-26Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maintSverker Eriksson
* sverker/erts/atomics-counters/OTP-13468: erts: Fix bug in counters erts: Refactor erl_bif_counters.c
2018-11-26persistent_term.xml: Fix spellingBjörn Gustavsson
2018-11-23erts: Fix bug in countersSverker Eriksson
Wow, that could have been embarrassing.
2018-11-23erts: Refactor erl_bif_counters.cSverker Eriksson
with more consistent naming.
2018-11-23Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release
2018-11-23Prepare releaseErlang/OTP
2018-11-23Merge branch 'john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237' ↵Erlang/OTP
into maint-21 * john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-23Merge branch 'john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237' ↵John Högberg
into maint * john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-22Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maintSverker Eriksson
AGAIN * sverker/erts/atomics-counters/OTP-13468: erts: Add counters:put/3
2018-11-22erts: Fix faulty assert in driver_SUITESverker Eriksson
Set drv_use_singleton.fd_stop_select to -2 in start() as it's only used by driver_SUITE:driver_select_use.
2018-11-21erts: Clarify erl_nif docs about callback environmentsSverker Eriksson
2018-11-21erts: Add counters:put/3Sverker Eriksson
2018-11-20erts: Improve driver_SUITE:smp_selectSverker Eriksson
to better detect an actual missing ready_input event on slow machines (valgrind) and without wasting time with long sleep on fast machines.
2018-11-20Merge branch 'john/erts/spectre-configure-flag/OTP-15430/ERIERL-237' into ↵John Högberg
john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237 * john/erts/spectre-configure-flag/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-20Allow disabling retpoline in interpreter loopJohn Högberg
We only do this when the user has explicitly told us it's okay to partially disable mitigation (spectre-mitigation=incomplete). The macro is inert if it isn't.
2018-11-20Add a ./configure flag for spectre mitigationJohn Högberg
Note that the ERTS_NO_RETPOLINE macro introduced by this commit is completely inert unless spectre-mitigation is set to 'incomplete.' This includes when mitigation has been manually enabled through CFLAGS, so it should be impossible for it to unintentionally disable mitigation.
2018-11-16Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release
2018-11-16Merge branch 'john/erts/defer-orphan-file-close/OTP-15421/ERIERL-261' into maintJohn Högberg
* john/erts/defer-orphan-file-close/OTP-15421/ERIERL-261: Fix broken assertion on monitor release Avoid closing files in gc/monitor callbacks
2018-11-15Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maintSverker Eriksson
* sverker/erts/atomics-counters/OTP-13468: erts: Add new module 'counters' erts: Add new module 'atomics'
2018-11-15erts: Add new module 'counters'Sverker Eriksson
2018-11-15erts: Add new module 'atomics'Sverker Eriksson
2018-11-15Prepare releaseErlang/OTP
2018-11-14Merge branch 'maint-18' into maintLukas Larsson
* maint-18: Updated OTP version Prepare release Optimize operator '--' and yield on large inputs Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_lists.c erts/vsn.mk lib/stdlib/doc/src/notes.xml lib/stdlib/vsn.mk make/otp_version_tickets otp_versions.table
2018-11-13Fix broken assertion on monitor releaseJohn Högberg
We sometimes bump the refc without messing with the table, which means that we sometimes decrement it while in the table, causing the old assertion to fail. The property we want to check is that neither end of the monitor is present in the table when the monitor is deleted.
2018-11-13Avoid closing files in gc/monitor callbacksJohn Högberg
Closing files in these callbacks could block scheduler progress and cause major system instability. We now defer these operations to a dedicated process instead. This process may in turn block forever and prevent further orphaned files from being closed, but it will keep the emulator itself from misbehaving.