Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Bad practice
|
|
|
|
First stage in utc-time for prim_file.
|
|
|
|
* ta/sendfile/OTP-9240: (31 commits)
Add sendfile server printouts
Skip recv/send during tests for fallback platforms
Remove header/trailer support
Remove windows implementation
Expand sendfile documentation
Only allow tcp sockets as target for sendfile
Move sendfile api to file module
Preliminary work on header/trailer
Use free_sendfile explicitly for non-async
Remove debug printouts
Add tests for send/recv/sendfile interactions
Remove tests for file_server sendfile
sendfile caller now has to be the controlling_process
Remove support for file_server, sendfile has to be raw
Set chunk size to 3 GB
Change type of fd to be ErlDrvEvent
Add ifdef's for HAVE_SENDFILE
Fix freebsd support for sendfile
Change nbytes to 64 bit
Implement ignorefd for TCP
...
|
|
Since the API for headers/trailers seem to be very awkward to
work with when using non-blocking io the feature is dropped
for now. See unix_efile.c for more details.
|
|
|
|
Have to figure out how to represent progress in header writing when
using non-blocking, not sure how to do this.
|
|
Ignore fd is a feature used by sendfile to temporarily remove
all driver_select calls on that fd so that another driver can
select on it. It also delays all actions which sends or receives
data in that fd until in the fd is no longer ignored.
Only the controlling_process should use the feature as it is otherwise
possible that the ignore will never be cleaned up and hence create
a memory leak in the driver.
An ignored driver will not detect that an fd has been closed until
it is unignored.
|
|
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.
|
|
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.
|
|
Created erlang fallback for sendfile in gen_tcp and
moved sendfile from file to gen_tcp. Also created testcases
for testing all different options to sendfile.
For info about how sendfile should work see the BSD man pages
as they contain a more complete API than other *nixes.
|
|
aa_mem_data/2 is only called by aa_mem_data/1 and itself.
aa_mem_data/1 called with the argument 'notsup' will never
call aa_mem_data/2. aa_mem_data/2 will only call itself with
a #memory{} record as the first argument. QED.
Noticed-by: Dialyzer.
|
|
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."
|
|
|
|
It is better that gen_sctp:open/0-2 returns the informative Posix
return code {error,eprotonosupport} than previously {error,badarg}
when SCTP is not supported since it is so platform dependent.
|
|
|
|
|
|
|
|
|
|
* 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
|
|
A number of memory allocation optimizations have been implemented. Most
optimizations reduce contention caused by synchronization between
threads during allocation and deallocation of memory. Most notably:
* Synchronization of memory management in scheduler specific allocator
instances has been rewritten to use lock-free synchronization.
* Synchronization of memory management in scheduler specific
pre-allocators has been rewritten to use lock-free synchronization.
* The 'mseg_alloc' memory segment allocator now use scheduler specific
instances instead of one instance. Apart from reducing contention
this also ensures that memory allocators always create memory
segments on the local NUMA node on a NUMA system.
|
|
* dev:
Update copyright years
|
|
|
|
* dev:
Update preloaded modules
erl_prim_loader: Eliminate dialyzer warning
Conflicts:
erts/preloaded/ebin/erl_prim_loader.beam
|
|
|
|
The concat/1 function is now only used to append lists when
constructing filenames. Thus it is too general and the first
clause (that handles characters) will never be used.
We could just remove the clause that is never used, but then the
name 'concat' would be misleading and someone could use misuse it.
Therefore, replace concat/1 with the join/2 function that can only
be used for joining filename components.
|
|
Conflicts:
erts/aclocal.m4
erts/include/internal/ethread_header_config.h.in
|
|
|
|
|
|
* dev:
Update documentation and specifications of some of the zlib functions
Conflicts:
erts/preloaded/ebin/zlib.beam
|
|
The functions zlib:deflateSetDictionary/2 and zlib:inflateSetDictionary/2
accept iodata() as Dictionary.
The functions zlib:crc32/2,3, zlib:adler32/2,3, zlib:compress/1,
zlib:uncompress/1, zlib:zip/1, and zlib:unzip/1 accept iodata() as
data.
|
|
|
|
concat_binary/1 was deprecated in R13B04, but already in
the R10B-2 release, the documentation recommends using
list_to_binary/1 instead.
|
|
|
|
|
|
An incorrect spec, rpc:yield/1, has been fixed.
|
|
|
|
The efile driver will now use chunked data on list_dir. This will
lessen the number of sends to prim_file and hence improve
performance. This method is utilized in both direct and async cases.
|
|
|
|
An experimental version of Dialyzer discovered that the atom that
replaced the DRV macro in prim_file ends up in calls to
erlang:open_port({spawn, Driver}, Portopts) as the Driver argument. The
documentation states that this call requires a string there.
This change is also consistent with the one introduced in commit
0f03b1e9d2bef3bc830c31a369261af4c5234727 by Kostis Sagonas.
|
|
|
|
|
|
|
|
|
|
|
|
|