Commit Graph

49 Commits

Author SHA1 Message Date
Gordon Bergling
f6d234d870 libc: Fix most issues reported by mandoc
- varios "new sentence, new line" warnings
- varios "sections out of conventional order" warnings
- varios "unusual Xr order" warnings
- varios "missing section argument" warnings
- varios "no blank before trailing delimiter" warnings
- varios "normalizing date format" warnings

MFC after:	1 month
2020-12-19 14:54:28 +00:00
John Baldwin
e42b096439 Document EINTEGRITY errors for many system calls.
EINTEGRITY was previously documented as a UFS-specific error for
mount(2).  This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2).  EIO was previously only documented for
UFS for mount(2).

Reviewed by:	mckusick
Suggested by:	mckusick
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24168
2020-03-30 21:44:00 +00:00
Michael Tuexen
db4493f7b6 sendfile() does currently not support SCTP sockets.
Therefore, fail the call.

Reviewed by:		markj@
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D24059
2020-03-13 18:38:28 +00:00
Gleb Smirnoff
5bfb2e008d Imaginary cat jumped my keyboard! 2019-02-15 23:46:34 +00:00
Gleb Smirnoff
66fb0b1ad7 For 32-bit machines rollback the default number of vnode pager pbufs
back to the lever before r343030.  For 64-bit machines reduce it slightly,
too.  Together with r343030 I bumped the limit up to the value we use at
Netflix to serve 100 Gbit/s of sendfile traffic, and it probably isn't a
good default.

Provide a loader tunable to change vnode pager pbufs count. Document it.
2019-02-15 23:36:22 +00:00
Enji Cooper
2b9ecf4896 Document that sendfile will return an invalid value for sbytes if provided an invalid address
This is meant to clarify the fact that the system call will not fail
with -1/EFAULT, as one might expect, when reading the sendfile(2)
manpage today.

While here, pet the mandoc linter, when dealing with the section that
describes valid values for `flags`.

PR:	232210
MFC after:	2 weeks
Approved by:	emaste (mentor)
Reviewed by:	glebius, 0mp
Differential Revision: https://reviews.freebsd.org/D18949
2019-01-25 19:56:02 +00:00
Allan Jude
c452913091 Document that sendfile(2) can return ENOTCAPABLE
PR:		232207
Submitted by:	Enji Cooper <yaneurabeya@gmail.com>
Approved by:	re (rgrimes)
2018-10-13 02:20:16 +00:00
Mark Johnston
d09fcbd30e Add a space between a section number and a following comma.
Fix some nits from igor while here.

MFC after:	3 days
2018-03-15 19:03:54 +00:00
Eitan Adler
837fe32558 Fix a few more speelling errors
Reviewed by:		bjk
Reviewed by:		jilles (incl formal "accept")
Differential Revision:	https://reviews.freebsd.org/D13650
2017-12-28 01:31:28 +00:00
Gleb Smirnoff
00b5ffde8e Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't
do any speculations about readahead, and use exactly the amount of readahead
specified by user.  E.g. setting SF_FLAGS(0, SF_USER_READAHEAD) will guarantee
that no readahead at all will be performed.
2016-11-17 21:36:18 +00:00
Gleb Smirnoff
2bab0c5535 New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and
up to now.

The new sendfile is the code that Netflix uses to send their multiple tens
of gigabits of data per second. The new implementation features asynchronous
I/O, when I/O operations are launched, but not awaited to be complete. An
explanation of why such behavior is beneficial compared to old one is
going to be too long for a commit message, so we will skip it here.

Additional features of new syscall are extra flags, which provide an
application more control over data sent. The SF_NOCACHE flag tells
kernel that data shouldn't be cached after it was sent. The SF_READAHEAD()
macro allows to specify readahead size in pages.

The new syscalls is a drop in replacement. No modifications are required
to applications. One can take nginx binary for stable/10 and run it
successfully on head. Although SF_NODISKIO lost its original sense, as now
sendfile doesn't block, and now means something completely different (tm),
using the new sendfile the old way is absolutely safe.

Celebrates:	Netflix global launch!
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
Relnotes:	yes
2016-01-08 20:34:57 +00:00
Baptiste Daroussin
8fbf3d50e3 use .Mt to mark up email addresses consistently (part4)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:25:03 +00:00
Kevin Lo
d9b3cfecfd Document that sendfile(2) can fail with ENOBUFS.
Reviewed by:	glebius
2012-11-14 01:45:10 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Konstantin Belousov
4319da1319 Further fix grammar.
Suggested by:	alc
MFC after:	3 days
2010-01-07 21:14:46 +00:00
Christian Brueffer
44640a5251 Fix a typo and bump date for the previous commit. 2010-01-07 21:08:22 +00:00
Konstantin Belousov
0b56296772 Give some information on SF_MNOWAIT flag.
MFC after:	3 days
2010-01-07 13:31:00 +00:00
Poul-Henning Kamp
b75a1171d8 Give sendfile(2) a SF_SYNC flag which makes it wait until all mbufs
referencing the files VM pages are returned from the network stack,
making changes to the file safe.

This flag does not guarantee that the data has been transmitted to the
other end.
2008-02-03 15:54:41 +00:00
Yaroslav Tykhiy
df19774d2f Note that, thanks to the work by Alan Cox et al, some arch'es
don't need sendfile() buffers any more.

The report on the work referenced can be found at
http://usenix.org/events/usenix05/tech/general/elmeleegy.html

MFC after:	1 week
2006-11-24 11:44:19 +00:00
Ruslan Ermilov
110e1704d3 -mdoc sweep. 2005-11-17 13:00:00 +00:00
Joseph Koshy
9dc2f0df89 Document the fact that sendfile(2) can EOPNOTSUPP if the underlying
filesystem for the file being transferred doesn't support UIO_NOCOPY.

Reported by:	Niki Denev <nike_d@cytexbg.com>
2005-10-31 04:08:28 +00:00
Joseph Koshy
012546dd27 Sort error list. 2005-10-31 04:00:20 +00:00
Ruslan Ermilov
2d82ac3110 Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
Yaroslav Tykhiy
017aaf79e1 Since sendfile(2) works on regular files only,
which have no negative offsets, "negative" and
"invalid" are equivalent WRT the offset argument.

Suggested by:	bde
2004-10-18 10:02:04 +00:00
Yaroslav Tykhiy
6def5837f5 Improve mdoc(7) markup. 2004-10-16 09:46:38 +00:00
Yaroslav Tykhiy
fc5cfaae79 Give details on what will happen if the `offset' argument
to sendfile(2) falls beyond the end of file.

Touch .Dd.

PR:		bin/72649 (in the audit trail)
MFC after:	1 week
2004-10-16 09:39:25 +00:00
Ruslan Ermilov
33992dc0ed Markup, grammar, and spelling fixes. 2004-06-30 20:09:10 +00:00
Mike Pritchard
3c6dd63b2c Spelling fixes. 2004-06-21 18:57:32 +00:00
Mike Silbersack
a4e8244762 Document the SF_NODISKIO flag, and fix a small typo. 2004-02-08 07:38:35 +00:00
Maxim Konovalov
d22427bf0f Describe kern.ipc.nsfbufsused and kern.ipc.nsfbufspeak.
Reviewed by:	silby
2003-12-29 12:29:37 +00:00
David Greenman
186e347f2c Fixed a bug in sendfile(2) where the sent data would be corrupted due
to sendfile(2) being erroneously automatically restarted after a signal
is delivered. Fixed by converting ERESTART to EINTR prior to exiting.

Updated manual page to indicate the potential EINTR error, its cause
and consequences.

Approved by: re@freebsd.org
2003-12-01 22:12:50 +00:00
Ruslan Ermilov
3a5146d9e2 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
Sean Chittenden
99c24e2b2c Update sendfile.2 to include a TUNING section that documents the
various tunables that are applicable to sendfile(2).  Update tuning.7
to mention a reference to sendfile.2.

Approved by:	keramida
2003-03-12 09:28:44 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
2faeeff4c9 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
Ruslan Ermilov
db8caf03e5 Remove the internal implementation details of wrapping syscalls,
which do not match the reality anyway.

Approved by:	deischen, bde
2001-10-26 17:38:20 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Yaroslav Tykhiy
b1250632c5 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by:	ru
2001-08-09 13:32:13 +00:00
Stephen McKay
48492d6b26 Spelling. 2001-02-04 02:05:16 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Chris Costello
12b03e57e5 Remove a superfluous `.Pp' occuring directly after
`.Sh IMPLEMENTATION NOTES'.
2000-05-19 02:55:43 +00:00
Chris Costello
ef626a01c1 Add a note under IMPLEMENTATION NOTES about the behavior of sendfile()
in the threaded library.
2000-05-19 02:53:55 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Mike Pritchard
74804d58a0 Various man page cleanup:
- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlines in mdoc(7)
- Other misc mdoc cleanup.

PR:		doc/13144
Submitted by:	Alexy M. Zelkin <phantom@cris.net>
1999-08-15 09:51:25 +00:00
Sheldon Hearn
4a9e5bd0db Correct HISTORY section, according to CVS logs.
PR:	12810
Submitted by:	Alex Perel <veers@disturbed.net>
1999-07-26 09:37:47 +00:00
David Greenman
adcac26551 Added info about non-blocking support. 1998-11-06 19:35:58 +00:00
David Greenman
eff8678df3 Added a manual page for sendfile(2). 1998-11-05 14:43:29 +00:00