The official NGINX Open Source repository.
Go to file
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
auto Simplified sendfile(SF_NODISKIO) usage. 2021-12-27 19:48:33 +03:00
conf MIME: added image/avif type. 2021-10-25 20:49:15 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2021-12-20 20:02:48 +02:00
docs nginx-1.21.4-RELEASE 2021-11-02 17:49:22 +03:00
misc Updated OpenSSL used for win32 builds. 2021-08-31 17:54:54 +03:00
src Simplified sendfile(SF_NODISKIO) usage. 2021-12-27 19:48:33 +03:00
.hgtags release-1.21.4 tag 2021-11-02 17:49:22 +03:00