diff options
Diffstat (limited to 'lib/libc/sys/sendfile.2')
| -rw-r--r-- | lib/libc/sys/sendfile.2 | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index fac2577926d14..96979eed5a7b8 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -107,22 +107,22 @@ implementation of .Fn sendfile is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. .Sh TUNING -Internally this system call uses a special +Internally, this system call uses a special .Xr sendfile 2 buffer -.Pq Fa "struct sf_buf" +.Pq Vt "struct sf_buf" to handle sending file data to the client. If the sending socket is -blocking and there are not enough sendfile buffers available, +blocking, and there are not enough sendfile buffers available, .Xr sendfile 2 will block and report a state of -.Dq sfbufa . +.Dq Li sfbufa . If the sending socket is non-blocking and there are not enough sendfile buffers available, the call will block and wait for the necessary buffers to become available before finishing the call. .Pp The number of -.Fa sf_buf Ns 's +.Vt sf_buf Ns 's allocated should be proportional to the number of nmbclusters used to send data to a client via .Xr sendfile 2 . @@ -130,19 +130,21 @@ Tune accordingly to avoid blocking! Busy installations that make extensive use of .Xr sendfile 2 may want to increase these values to be inline with their -.Ar kern.ipc.nmbclusters -.Pq see Xr tuning 7 for details . +.Va kern.ipc.nmbclusters +(see +.Xr tuning 7 +for details). .Pp The number of .Xr sendfile 2 buffers in use is determined at boot time by either the -.Em kern.ipc.nsfbufs +.Va kern.ipc.nsfbufs .Xr loader.conf 5 variable or the -.Em NSFBUFS +.Dv NSFBUFS kernel configuration tunable. The number of sendfile buffers scales with -.Em kern.maxusers . +.Va kern.maxusers . .Sh RETURN VALUES .Rv -std sendfile .Sh ERRORS @@ -198,8 +200,8 @@ If specified, the number of bytes successfully sent will be returned in .Xr open 2 , .Xr send 2 , .Xr socket 2 , -.Xr tuning 7 , -.Xr writev 2 +.Xr writev 2 , +.Xr tuning 7 .Sh HISTORY The .Fn sendfile |
