diff options
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_freebsd_sendfile_chain.c | 18 | ||||
-rw-r--r-- | src/os/unix/ngx_linux_sendfile_chain.c | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c index bb89336fe..e76f4c6f4 100644 --- a/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/src/os/unix/ngx_freebsd_sendfile_chain.c @@ -5,16 +5,16 @@ /* - * sendfile() often sends 4K pages over ethernet in 3 packets: 2x1460 and 1176 - * or in 6 packets: 5x1460 and 892. Besides although sendfile() allows - * to pass the header and the trailer it never sends the header or the trailer - * with the part of the file in one packet. So we use TCP_NOPUSH (similar - * to Linux's TCP_CORK) to postpone the sending - it not only sends the header - * and the first part of the file in one packet but also sends 4K pages - * in the full packets. + * FreeBSD's sendfile() often sends 4K pages over ethernet in 3 packets: 2x1460 + * and 1176 or in 6 packets: 5x1460 and 892. Besides although sendfile() + * allows to pass the header and the trailer it never sends the header or + * the trailer with the part of the file in one packet. So we use TCP_NOPUSH + * (similar to Linux's TCP_CORK) to postpone the sending - it not only sends + * the header and the first part of the file in one packet but also sends + * 4K pages in the full packets. * - * Until FreeBSD 4.5 the turning TCP_NOPUSH off does not flush the pending - * data that less than MSS so the data can be sent with 5 second delay. + * Until FreeBSD 4.5 the turning TCP_NOPUSH off does not flush a pending + * data that less than MSS so that data can be sent with 5 second delay. * We do not use TCP_NOPUSH on FreeBSD prior to 4.5 although it can be used * for non-keepalive HTTP connections. */ diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c index d96d93df7..d4e45bbe4 100644 --- a/src/os/unix/ngx_linux_sendfile_chain.c +++ b/src/os/unix/ngx_linux_sendfile_chain.c @@ -6,10 +6,9 @@ /* * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit - * offsets only and the including <sys/sendfile.h> breaks building - * if off_t is 64 bit wide. So we use own sendfile() definition where - * offset paramter is int32_t. It allows to use sendfile() with - * the file parts below 2G. + * offsets only and the including <sys/sendfile.h> breaks building if + * off_t is 64 bit wide. So we use own sendfile() definition where offset + * parameter is int32_t and use sendfile() with the file parts below 2G. * * Linux 2.4.21 has a new sendfile64() syscall #239. */ |