aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/file_server.erl
AgeCommit message (Collapse)Author
2017-11-30Reimplement efile_drv as a dirty NIFJohn Högberg
This improves the latency of file operations as dirty schedulers are a bit more eager to run jobs than async threads, and use a single global queue rather than per-thread queues, eliminating the risk of a job stalling behind a long-running job on the same thread while other async threads sit idle. There's no such thing as a free lunch though; the lowered latency comes at the cost of increased busy-waiting which may have an adverse effect on some applications. This behavior can be tweaked with the +sbwt flag, but unfortunately it affects all types of schedulers and not just dirty ones. We plan to add type-specific flags at a later stage. sendfile has been moved to inet_drv to lessen the effect of a nasty race; the cooperation between inet_drv and efile has never been airtight and the socket dying at the wrong time (Regardless of reason) could result in fd aliasing. Moving it to the inet driver makes it impossible to trigger this by closing the socket in the middle of a sendfile operation, while still allowing it to be aborted -- something that can't be done if it stays in the file driver. The race still occurs if the controlling process dies in the short window between dispatching the sendfile operation and the dup(2) call in the driver, but it's much less likely to happen now. A proper fix is in the works. -- Notable functional differences: * The use_threads option for file:sendfile/5 no longer has any effect. * The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling. -- OTP-14256
2017-09-05kernel: Improve handling of UnicodeHans Bolinder
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2013-04-05Use erlang:demonitor(Ref, [flush]) where applicableLoïc Hoguin
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-18Fix broken file:read_link_all/1Björn Gustavsson
It produced the same result as file:read_link/1.
2013-02-11Add file:list_dir_all/1 and file:read_link_all/1Björn Gustavsson
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-02Move datetime into prim_fileBjörn-Egil Dahlberg
2010-03-09Merge branch 'ks/types' into devErlang/OTP
* ks/types: file.hrl: Move out type declarations kernel: Add types and specs OTP-8494 ks/types
2010-03-07kernel: Add types and specsKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP