Age | Commit message (Collapse) | Author |
|
|
|
|
|
When we are going to implement functions that can load many modules
at once, we don't the erl_prim_loader server to become a bottleneck.
Therefore, we need erl_prim_loader:get_modules/3 that can read many
BEAM files in parallel.
Note that we will not bother making reading from archive files
or using the inet loader efficient. That can be done later if it
turns out to be important.
|
|
|
|
The BIFs prepare_loading/2 and finish_loading/1 have been
designed to allow fast loading in parallel of many modules.
Because of the complications with on_load functions,
the initial implementation of finish_loading/1 only allowed
a single element in the list of prepared modules.
finish_loading/1 does not suspend other processes, but it must wait
for all schedulers to pass a write barrier ("thread progress"). The
time for all schedulers to pass the write barrier is highly variable,
depending on what kind of code they are executing. Therefore, allowing
finish_loading/1 to finish the loading for more than one module before
passing the write barrier could potentially be much faster than
calling finish_loading/1 multiple times.
The test case many/1 run on my computer shows that with "heavy load",
finish loading of 100 modules in parallel is almost 50 times faster
than loading them sequentially. With "light load", the gain is still
almost 10 times.
Here follows an actual sample of the output from the test case on
my computer (an 2012 iMac):
Light load
==========
Sequential: 22361 µs
Parallel: 2586 µs
Ratio: 9
Heavy load
==========
Sequential: 254512 µs
Parallel: 5246 µs
Ratio: 49
|
|
|
|
Just mask away the high bits to get a more tolerant erlang:halt
that behaves the same on 32 and 64 bit architectures.
|
|
This is mostly a pure refactoring.
Except for the buggy cases when calling erlang:halt() with a positive
integer in the range -(INT_MIN+2) to -INT_MIN that got confused with
ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT.
Outcome OLD erl_exit(n, ) NEW erts_exit(n, )
------- ------------------- -------------------------------------------
exit(Status) n = -Status <= 0 n = Status >= 0
crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0
The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and
ERTS_DUMP_EXIT are the same as before (even though their values have
changed).
|
|
* maint:
Do not wait for main lock when looking up process not running
|
|
* rickard/proc-not-running/OTP-13365:
Do not wait for main lock when looking up process not running
|
|
* maint:
Update preloaded module
typos
Conflicts:
erts/preloaded/ebin/prim_file.beam
|
|
|
|
|
|
|
|
|
|
|
|
Except it cannot be disabled and cannot be multi-threaded.
The bit-vector 'erts_literal_vspace_map' on 32-bit is currently only
protected by the literal allocator mutex. We could allow multiple
instances on 64-bit (I think), but what would be the point?
|
|
* maint:
Improve cmpxchg8b/cmpxchg16b inline asm
Improve cmpxchg8b inline asm configure test
|
|
* rickard/dw-cmpxchg-clang/OTP-13336:
Improve cmpxchg8b/cmpxchg16b inline asm
|
|
* rickard/gcc5-pic-cmpxchg8b/OTP-13326:
Improve cmpxchg8b inline asm configure test
|
|
|
|
* sverk/proc-lock-check-fix:
erts: Fix lock checker for process locks
|
|
* maint:
Fix a few dialyzer warnings
|
|
|
|
The wake_scheduler function asserts that the run queue is not locked,
but this assertion sometimes fails for dirty schedulers (in January
2016 a user in erlang-questions reported a dirty schedulers problem
related to this). After discussing it with Rickard, we decided
modifying the assertion was the most practical way to address the
problem.
|
|
We will need a way to check whether an prepared BEAM modules has
an on_load function.
|
|
* rickard/rq-state-bug/OTP-13298:
Fix bug causing run-queue mask to become inconsistent
|
|
Do lock order check *before* trying to seize lock... duh!
|
|
OTP-13341
* sverk/erts-hipe_x86_signal-cleanups:
hipe_sigaltstack: correct initialization of ss.ss_flags
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
|
|
Clang didn't like that ecx/rcx was mapped to input and output
variables of different types.
|
|
* sverk/fix-list-length-int/OTP-13288:
erts: Fix error cases in enif_get_list_length
erts: Use Sint instead of int for list lengths
|
|
* bjorn/remove-test_server/OTP-12705:
Remove test_server as a standalone application
Erlang mode for Emacs: Include ct.hrl instead test_server.hrl
Remove out-commented references to the test_server applications
Makefiles: Remove test_server from include path and code path
Eliminate use of test_server.hrl and test_server_line.hrl
|
|
|
|
* sverk/nif-test-cuddle:
erts: Fix wobbling test failure in nif_SUITE
|
|
|
|
* msantos/ms/typo-windows-build-script:
Fix typo in Windows build scripts
OTP-13337
|
|
* jv/erts/optimize-cmp:
Unify comparison macros in erl_utils.h
Avoid erts_cmp jump in atom, int and float comparisons
|
|
|
|
|
|
Since no test suites includede test_server.hrl, there is no need
to have test_server in the include path or code path.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
|
|
This commit implements erts_internal:system_check(schedulers) with the
intent of a basic responsiveness test check of the schedulers.
|
|
This removes the duplication in having both `cmp_eq`
and `CMP_EQ` and normalizes their name to uppercase.
|
|
Given the function definition below:
check(X) when X >= 0, X <= 20 -> true.
@nox has originally noticed that perfoming lt and ge
guard tests were performing slower than they should be.
Further investigation revealed that most of the cost
was in jumping to the erts_cmp function. This patch
brings the operations already inlined in erts_cmp
into the emulator, removing the jump cost.
After applying these changes, invoking the check/1
function defined above 30000 times with different
values from 0 to 20 has fallen from 367us to 213us
(measured as average of 3 runs). This is a
considerably improvement over Erlang 18 which takes
556us on average.
Floats have also dropped their time from 1126us
(on Erlang 18) to 613us.
|
|
* rickard/ds-fixes:
Fix unique_SUITE for dirty schedulers
Add dirty scheduler process termination test
Ensure that work is done on the correct type of schedulers
Conflicts:
erts/emulator/beam/erl_process.c
erts/emulator/beam/erl_process.h
erts/emulator/beam/erl_process_dump.c
|
|
|
|
In scheduler_SUITE add a new test that runs a single dirty I/O
scheduler and launches a number of dirty I/O NIF calls that each sleep
for 3 seconds. Given the single scheduler, the first of these will run
while the rest queue up. Then start killing these processes, and
verify they call exit correctly.
|
|
Only the actual call to the dirty nif is allowed to execute on
dirty schedulers. The dirty nif is not allowed to execute on
normal schedulers if dirty schedulers are available.
Arrival of exit signals and system tasks, while a process was
scheduled for execution on a dirty scheduler, could mess up the
process internal state.
Preparation for dirty system task has been made, but is currently
unused.
|