Age | Commit message (Collapse) | Author |
|
When sendfile crashes during a send there should be no
error_logger printouts about stolen fds.
|
|
If the socket is closed by the remote end, sendfile
now returns {error,closed}.
|
|
|
|
Thanks Tuncer Ayaz
|
|
sendfilev is a richer API which allows us to
do non blocking TCP on solaris. The normal
sendfile API seems to have some issue with
non blocking sockets and the return value of
sendfile.
|
|
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.
|
|
This is needed because aync job will not call free_sendfile
if there is an async_ready callback.
|
|
|
|
It is not possible to use the maximum size_t/off_t for the chunks
as that causes sendfile to return einval. 3GB seems to work on all
*nix platforms.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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."
|
|
|
|
This reverts commit e21ff9b0b69219ab3853be7e80813156113152b7.
|
|
|
|
* pan/osx_gcc_fixes:
Fix typo in erts/configure.in
Make OTP build w/alternative gcc on MacOS Lion
OTP-9712
|
|
* 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
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|