nginx/auto
Maxim Dounin 20c35434ef Simplified sendfile(SF_NODISKIO) usage.
Starting with FreeBSD 11, there is no need to use AIO operations to preload
data into cache for sendfile(SF_NODISKIO) to work.  Instead, sendfile()
handles non-blocking loading data from disk by itself.  It still can, however,
return EBUSY if a page is already being loaded (for example, by a different
process).  If this happens, we now post an event for the next event loop
iteration, so sendfile() is retried "after a short period", as manpage
recommends.

The limit of the number of EBUSY tolerated without any progress is preserved,
but now it does not result in an alert, since on an idle system event loop
iteration might be very short and EBUSY can happen many times in a row.
Instead, SF_NODISKIO is simply disabled for one call once the limit is
reached.

With this change, sendfile(SF_NODISKIO) is now used automatically as long as
sendfile() is enabled, and no longer requires "aio on;".
2021-12-27 19:48:33 +03:00
..
cc Win32: defined pdb path. 2019-04-04 19:30:47 +03:00
lib PCRE2 library support. 2021-12-25 01:07:15 +03:00
os Simplified sendfile(SF_NODISKIO) usage. 2021-12-27 19:48:33 +03:00
types Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
configure Core: "-e" command line option. 2020-11-19 16:59:00 +00:00
define Copyright updated. 2012-01-18 15:07:43 +00:00
endianness Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
feature Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
have Copyright updated. 2012-01-18 15:07:43 +00:00
have_headers Copyright updated. 2012-01-18 15:07:43 +00:00
headers Copyright updated. 2012-01-18 15:07:43 +00:00
include Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
init Configure: marked top-level make targets as phony. 2021-02-20 12:44:26 +03:00
install Configure: marked top-level make targets as phony. 2021-02-20 12:44:26 +03:00
make Configure: shared sources for addon modules. 2020-11-10 17:13:20 +03:00
module Configure: shared sources for addon modules. 2020-11-10 17:13:20 +03:00
modules Moved Huffman coding out of HTTP/2. 2021-12-21 07:54:16 +03:00
nohave Copyright updated. 2012-01-18 15:07:43 +00:00
options PCRE2 library support. 2021-12-25 01:07:15 +03:00
sources Moved Huffman coding out of HTTP/2. 2021-12-21 07:54:16 +03:00
stubs Copyright updated. 2012-01-18 15:07:43 +00:00
summary PCRE2 library support. 2021-12-25 01:07:15 +03:00
threads Configure: fixed static compilation with OpenSSL 1.1.1. 2018-03-22 15:55:57 +03:00
unix Configure: fixed --test-build-epoll on FreeBSD 13. 2021-04-05 20:14:16 +03:00