History log of /src/lib/libsys/sendfile.2 (Results 1 – 25 of 53)
Revision Date Author Comments
# d17cbe46 24-Jun-2025 Gleb Smirnoff <glebius@FreeBSD.org>

sendfile: retire SF_SYNC

The flag was added in b75a1171d8ba4 for the sake of Varnish. However, that
idea didn't work. Quoting email from Poul-Henning:

"We had to give up sendfile(), the overhead

sendfile: retire SF_SYNC

The flag was added in b75a1171d8ba4 for the sake of Varnish. However, that
idea didn't work. Quoting email from Poul-Henning:

"We had to give up sendfile(), the overhead of keeping track of everything
between the network stack and VM system made ate any gain we saw. ... I
dont think we ever shipped a version where sendfile was enabled by
default."

PR: 287348

show more ...


# 1a720cbe 15-May-2024 Alexander Ziaee <concussious@runbox.com>

man filesystems: fix xrefs after move to section 4

Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077


# 8269e767 14-Nov-2023 Brooks Davis <brooks@FreeBSD.org>

libsys: relocate implementations and manpages

Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths

libsys: relocate implementations and manpages

Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths to allow libc to find them in their new home.

Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908

show more ...


# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


# f6d234d8 19-Dec-2020 Gordon Bergling <gbe@FreeBSD.org>

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 sect

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

show more ...


# e42b0964 30-Mar-2020 John Baldwin <jhb@FreeBSD.org>

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

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

show more ...


# db4493f7 13-Mar-2020 Michael Tuexen <tuexen@FreeBSD.org>

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


# 5bfb2e00 15-Feb-2019 Gleb Smirnoff <glebius@FreeBSD.org>

Imaginary cat jumped my keyboard!


# 66fb0b1a 15-Feb-2019 Gleb Smirnoff <glebius@FreeBSD.org>

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 t

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.

show more ...


# 2b9ecf48 25-Jan-2019 Enji Cooper <ngie@FreeBSD.org>

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 ex

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

show more ...


# c4529130 13-Oct-2018 Allan Jude <allanjude@FreeBSD.org>

Document that sendfile(2) can return ENOTCAPABLE

PR: 232207
Submitted by: Enji Cooper <yaneurabeya@gmail.com>
Approved by: re (rgrimes)


# d09fcbd3 15-Mar-2018 Mark Johnston <markj@FreeBSD.org>

Add a space between a section number and a following comma.

Fix some nits from igor while here.

MFC after: 3 days


# 837fe325 28-Dec-2017 Eitan Adler <eadler@FreeBSD.org>

Fix a few more speelling errors

Reviewed by: bjk
Reviewed by: jilles (incl formal "accept")
Differential Revision: https://reviews.freebsd.org/D13650


# 00b5ffde 17-Nov-2016 Gleb Smirnoff <glebius@FreeBSD.org>

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,

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.

show more ...


# 2bab0c55 08-Jan-2016 Gleb Smirnoff <glebius@FreeBSD.org>

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 n

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

show more ...


# 8fbf3d50 23-Jun-2014 Baptiste Daroussin <bapt@FreeBSD.org>

use .Mt to mark up email addresses consistently (part4)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>


# d9b3cfec 14-Nov-2012 Kevin Lo <kevlo@FreeBSD.org>

Document that sendfile(2) can fail with ENOBUFS.

Reviewed by: glebius


# 50d675f7 29-Mar-2012 Eitan Adler <eadler@FreeBSD.org>

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


# 4319da13 07-Jan-2010 Konstantin Belousov <kib@FreeBSD.org>

Further fix grammar.

Suggested by: alc
MFC after: 3 days


# 44640a52 07-Jan-2010 Christian Brueffer <brueffer@FreeBSD.org>

Fix a typo and bump date for the previous commit.


# 0b562967 07-Jan-2010 Konstantin Belousov <kib@FreeBSD.org>

Give some information on SF_MNOWAIT flag.

MFC after: 3 days


# b75a1171 03-Feb-2008 Poul-Henning Kamp <phk@FreeBSD.org>

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

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.

show more ...


# df19774d 24-Nov-2006 Yaroslav Tykhiy <ytykhiy@gmail.com>

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

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

show more ...


# 110e1704 17-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

-mdoc sweep.


# 9dc2f0df 31-Oct-2005 Joseph Koshy <jkoshy@FreeBSD.org>

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>


123