Age | Commit message (Collapse) | Author |
|
When there are no async threads sendfile will use the
ready_output select on the socket fd to know when to send
data.
The file_desc will also be put in the sending sendfile_state
which buffers all other commands to that file until the
sendfile is done.
|
|
Move sendfile data to invoke data instead of file_descr.
Remove usage of ready_output when doing a send.
If told to send 0 bytes, file_sendfile now sends the entire file
for linux.
|
|
outputv will always be used so removed output to decrease
confusion.
|
|
Move the command handling to outputv in preparation for
header and trailer inclusion in the sendfile api.
Use the standard efile communication functions for sendfile.
|
|
Allow Erlang code to use sendfile() where available by wrapping it as
file:sendfile/4 and file:sendfile/2.
sendfile(2) - Linux man page:
"sendfile() copies data between one file descriptor and another.
Because this copying is done within the kernel, sendfile() is more
efficient than the combination of read(2) and write(2), which would
require transferring data to and from user space."
|
|
* pan/binary_match_scope/OTP-9701:
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Remove GCC 4.6 set-but-not-used warning from erl_bif_binary
Make binary:match with scope return correct values
|
|
* sverk/hipe-without-fpe/OTP-9724:
otp_build: Disable FPE by default on Linux
stdlib: Make sure qlc_SUITE:otp_6964 restores backtrace_depth
erts: Add test for inf/NaN intermediate float results
hipe,erts: Allow hipe without floating point exceptions
hipe: Fix bug in hipe_rtl_lcm:calc_killed_expr_bb
erts: Rename macros used by float instructions without FPE
|
|
* rickard/sched-compact-load/OTP-9695:
Add switch that can disable scheduler compaction of load
|
|
* bjorn/erts/refc-binary-literals/OTP-9486:
external.c: Remove the option to create over-sized heap binaries
Allow refc binaries in literal pools
code_SUITE clean-up: Remove experimental 'constant_pool' option
|
|
* raimo/sctp-dev/OTP-9239: (21 commits)
erts: Possible bugfix for error chunk on old Solaris 10
kernel: Documented gen_sctp:peeloff/2
kernel: Adjust SCTP test to SuSE quirk
erts: Fixes for SCTP on old Solaris 10
Update preloaded files
erts,kernel: Return eprotonosupport when SCTP is not supported
kernel: Adjust SCTP tests to Solaris quirks
erts: Fix SCTP decoding byteorder bug for adaptation_ind
kernel: Rewrite SCTP test socket handler
kernel: Fix SCTP tests for the FreeBSD protocol stack
kernel: Bugfix - SCTP connect with sndrcvinfo in assoc_change event
erts: Default enable SCTP in configure
Update primary bootstrap and preloaded files
erts: Use SCTP functions in default libs
erts: Improve SCTP message defragmenting
erts,kernel: Bugfix - collect fragmented SCTP messages on recv
kernel: Add tests for gen_sctp:peeloff/2
erts,kernel: Implement gen_sctp:peeloff/2
kernel: Add tests for SCTP stream sockets
erts,kernel: Add type stream sockets to SCTP
...
|
|
|
|
* sverker/valgrind-fixing:
erts: valgrind suppressions for prebuilt terms in os_info_init
Fix dlopen-leak of drivers with incorrect version
erts: Add valgrind suppression files
erts: Remove valgrind limit for erts_alloc_permanent_cache_aligned
erts: Fix write-after-free bug in inet driver
ETS: Fix faulty size calculation SIZEOF_EXTSEG
ETS: Fix valgrind PossiblyLost in ETS hash tables
|
|
|
|
|
|
Make sure that badarith is thrown even if end result is not inf/NaN
|
|
|
|
No semantic change, just code clarification.
Use unique macro names instead of redefining the original ones.
|
|
On e.g FreeBSD the functions sctp_bindx() and sctp_peeloff() do not require
any extra linkage library flags and there is no dynamic lib to load
for them; use configure to find them.
|
|
Receive several fragments within the same receive loop if possible.
|
|
|
|
|
|
|
|
Since refc binaries are now supported in literal pools, there is no
longer any need to allow the creation of over-sized heap binaries.
|
|
To simplify the implementation of literal pools (constant pools)
for the R12 release, a shortcut was taken regarding binaries --
all binaries would be stored as heap binaries regardless of size.
To allow a module containing literals to be unloaded, literal
terms are copied when sent to another process. That means that
huge literal binaries will also be copied if they are sent to
another process, which could be surprising.
Another problem is that the arity field in the header for the heap
object may not be wide enough to handle big binaries.
Therefore, bite the bullet and allow refc binaries to be stored
in literal pools. In short, the following need to be changed:
* Each loaded module needs a MSO list, linking all refc binaries
in the literal pool.
* When check_process_code/2 copies literals to a process heap,
it must link each referenced binary into the MSO list for the
process and increment the reference counter for the binary.
* purge_module/1 must decrement the reference counter for each
refc binary in the literal pool.
|
|
|
|
* bjorn/erts/code-loading/OTP-9720:
BEAM loader: Don't stop other schedulers until truly needed
BEAM loader: Refactor code loading into separate functions
beam_load.c: Factor out cleaning up of the loader state into free_state()
BEAM loader: Clean up handling of error reasons
Remove the useless -l option
beam_load.c: Simplify handling of the bs_put_string_II instruction
beam_load.c: Remove the unused struct LoadedCode
|
|
The erlang:module_load/2 BIF will stop all other schedulers
before it starts to process the BEAM file. That is not a problem
when starting the Erlang/OTP system, since the start-up is mostly
sequential. It is a problem, however, when big BEAM files are
loaded in an already running system.
After the refactoring in the previous commits, we can now do most
of the processing of the BEAM file before we stop the other schedulers,
so that we can minimize the time when only one scheduler will be
running.
Suggested-by: Bob Ippolito
|
|
|
|
|
|
|
|
|
|
|
|
Break apart code loading into the three functions:
erts_alloc_loader_state()
erts_prepare_loading()
erts_finish_loading()
The erts_alloc_loader_state() and erts_prepare_loading() can be
executed with all schedulers running. Only erts_finish_loading()
needs to be run in a single-scheduling system.
|
|
|
|
There is no reason to have erts_load_module() return integer values,
only to have the caller convert the values to atoms. Return the
appropriate atom directly from the place where the error is generated
instead. Return NIL if the module was successfully loaded.
|
|
* egil/reallocating-catches/OTP-9692:
erts: Teach VM to reallocate beam catch table
|
|
The -l option used to print information about modules being loaded,
but now it prints very little information.
|
|
Remove the special-case handling of the bs_put_string_II
instruction; simply use the string patch mechanism that is already
used for the i_bs_match_string_* instructions.
|
|
|
|
* rickard/multi-exit-bug/OTP-9705:
Make sure only one thread exits the runtime system
|
|
* rickard/win-cs-mutex/OTP-9671:
Use critical sections as mutex implementation on Windows
|
|
* rickard/generic-thr-queue/OTP-9632:
Use generic lock-free queue for async threads
Use generic lock-free queue for misc aux work
Implement generic lock-free queue
|
|
* rickard/thr-progress-block/OTP-9631:
Replace system block with thread progress block
|
|
* rickard/alloc-opt/OTP-7775:
Optimize memory allocation
Conflicts:
erts/aclocal.m4
erts/emulator/hipe/hipe_bif_list.m4
erts/preloaded/ebin/erl_prim_loader.beam
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/init.beam
erts/preloaded/ebin/otp_ring0.beam
erts/preloaded/ebin/prim_file.beam
erts/preloaded/ebin/prim_inet.beam
erts/preloaded/ebin/prim_zip.beam
erts/preloaded/ebin/zlib.beam
|
|
The runtime system crashed if more than one thread tried to exit
the runtime system at the same time.
|
|
Windows native critical sections are now used internally in the
runtime system as mutex implementation. This since they perform
better under extreme contention than our own implementation.
|
|
Queues used for communication between async threads and scheduler threads
have been replaced with lock-free queues.
Drivers using the driver_async functionality are not automatically locked
to the system anymore, and can be unloaded as any dynamically linked in
driver.
Scheduling of ready async jobs is now also interleaved in between other
jobs. Previously all ready async jobs was performed at once.
|
|
|
|
The implementation of an ERTS internal, generic, many to one, lock-free
queue for communication between threads. The many to one scenario is
very common in ERTS, so it can be used in a lot of places in the future.
Changing to this queue from a lock based queue, however, often requires
some redesigning. This since we have often used the lock of the queue
to protect other information too.
|
|
The ERTS internal system block functionality has been replaced by
new functionality for blocking the system. The old system block
functionality had contention issues and complexity issues. The
new functionality piggy-backs on thread progress tracking functionality
needed by newly introduced lock-free synchronization in the runtime
system. When the functionality for blocking the system isn't used
there is more or less no overhead at all. This since the functionality
for tracking thread progress is there and needed anyway.
|