diff xml/en/docs/http/ngx_http_core_module.xml @ 1432:9012d7935c9b

Documented that "aio sendfile" is deprecated. This also made it possible to move the description of sendfile() pre-loading from "aio" to "sendfile".
author Ruslan Ermilov <ru@nginx.com>
date Tue, 17 Mar 2015 09:18:35 +0300
parents 0eb8e261f349
children 2333e08e277d
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml	Tue Mar 10 08:20:21 2015 +0000
+++ b/xml/en/docs/http/ngx_http_core_module.xml	Tue Mar 17 09:18:35 2015 +0300
@@ -10,15 +10,14 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="37">
+        rev="38">
 
 <section id="directives" name="Directives">
 
 <directive name="aio">
 <syntax>
     <literal>on</literal> |
-    <literal>off</literal> |
-    <literal>sendfile</literal></syntax>
+    <literal>off</literal></syntax>
 <default>off</default>
 <context>http</context>
 <context>server</context>
@@ -27,7 +26,13 @@
 
 <para>
 Enables or disables the use of asynchronous file I/O (AIO)
-on FreeBSD and Linux.
+on FreeBSD and Linux:
+<example>
+location /video/ {
+    aio            on;
+    output_buffers 1 64k;
+}
+</example>
 </para>
 
 <para>
@@ -73,39 +78,6 @@
 -->
 
 <para>
-For AIO to work on FreeBSD,
-<link id="sendfile"/>
-needs to be disabled:
-<example>
-location /video/ {
-    aio            on;
-    sendfile       off;
-    output_buffers 1 64k;
-}
-</example>
-</para>
-
-<para>
-In addition, starting from FreeBSD&nbsp;5.2.1 and nginx&nbsp;0.8.12, AIO can
-also be used to pre-load data for <c-func>sendfile</c-func>:
-<example>
-location /video/ {
-    sendfile       on;
-    tcp_nopush     on;
-    aio            sendfile;
-}
-</example>
-In this configuration, <c-func>sendfile</c-func> is called with
-the <c-def>SF_NODISKIO</c-def> flag which causes it not to block on disk I/O,
-but, instead, report back that the data are not in memory.
-nginx then initiates an asynchronous data load by reading one byte.
-On the first read, the FreeBSD kernel loads the first 128K bytes
-of a file into memory, although next reads will only load data in 16K chunks.
-This can be changed using the
-<link id="read_ahead"/> directive.
-</para>
-
-<para>
 On Linux, AIO can be used starting from kernel version 2.6.22.
 Also, it is necessary to enable
 <link id="directio"/>,
@@ -145,6 +117,10 @@
 </example>
 </para>
 
+<para>
+See also the <link id="sendfile"/> directive.
+</para>
+
 </directive>
 
 
@@ -2204,6 +2180,31 @@
 <c-func>sendfile</c-func>.
 </para>
 
+<para>
+Starting from nginx&nbsp;0.8.12 and FreeBSD&nbsp;5.2.1,
+<link id="aio"/> can be used to pre-load data
+for <c-func>sendfile</c-func>:
+<example>
+location /video/ {
+    sendfile       on;
+    tcp_nopush     on;
+    aio            on;
+}
+</example>
+In this configuration, <c-func>sendfile</c-func> is called with
+the <c-def>SF_NODISKIO</c-def> flag which causes it not to block on disk I/O,
+but, instead, report back that the data are not in memory.
+nginx then initiates an asynchronous data load by reading one byte.
+On the first read, the FreeBSD kernel loads the first 128K bytes
+of a file into memory, although next reads will only load data in 16K chunks.
+This can be changed using the
+<link id="read_ahead"/> directive.
+<note>
+Before version 1.7.11, pre-loading could be enabled with
+<literal>aio sendfile;</literal>.
+</note>
+</para>
+
 </directive>