newlib-cygwin/newlib/libc/sys
jhb 2f55e1fa06 Add an external mbuf buffer type that holds
multiple unmapped pages.

Unmapped mbufs allow sendfile to carry multiple pages of data in a
single mbuf, without mapping those pages.  It is a requirement for
Netflix's in-kernel TLS, and provides a 5-10% CPU savings on heavy web
serving workloads when used by sendfile, due to effectively
compressing socket buffers by an order of magnitude, and hence
reducing cache misses.

For this new external mbuf buffer type (EXT_PGS), the ext_buf pointer
now points to a struct mbuf_ext_pgs structure instead of a data
buffer.  This structure contains an array of physical addresses (this
reduces cache misses compared to an earlier version that stored an
array of vm_page_t pointers).  It also stores additional fields needed
for in-kernel TLS such as the TLS header and trailer data that are
currently unused.  To more easily detect these mbufs, the M_NOMAP flag
is set in m_flags in addition to M_EXT.

Various functions like m_copydata() have been updated to safely access
packet contents (using uiomove_fromphys()), to make things like BPF
safe.

NIC drivers advertise support for unmapped mbufs on transmit via a new
IFCAP_NOMAP capability.  This capability can be toggled via the new
'nomap' and '-nomap' ifconfig(8) commands.  For NIC drivers that only
transmit packet contents via DMA and use bus_dma, adding the
capability to if_capabilities and if_capenable should be all that is
required.

If a NIC does not support unmapped mbufs, they are converted to a
chain of mapped mbufs (using sf_bufs to provide the mapping) in
ip_output or ip6_output.  If an unmapped mbuf requires software
checksums, it is also converted to a chain of mapped mbufs before
computing the checksum.

Submitted by:	gallatin (earlier version)
Reviewed by:	gallatin, hselasky, rrs
Discussed with:	ae, kp (firewalls)
Relnotes:	yes
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D20616
2019-09-25 09:01:19 +02:00
..
a29khif Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
amdgcn Add gfortran support for AMD GCN 2019-06-07 13:55:43 -04:00
arm Align libgloss/arm and libc/sys/arm sources: miscellaneous fixes 2019-08-05 13:00:53 +01:00
d10v Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
decstation Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
epiphany Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
h8300hms Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
h8500hms Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
linux Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
m88kbug Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
mmixware Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
netware Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
or1k Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
phoenix Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
rdos Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
rtems Add an external mbuf buffer type that holds 2019-09-25 09:01:19 +02:00
sh Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sparc64 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sun4 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sysmec Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sysnec810 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sysnecv850 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sysvi386 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
sysvnecv70 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
tic80 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
tirtos Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
w65 Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
z8ksim Bump release to 3.1.0 for yearly snapshot 2018-12-31 23:40:11 -05:00
Makefile.am Make newlib manpages (v3) 2016-07-04 14:17:10 +01:00
Makefile.in Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
aclocal.m4 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
configure AMD GCN Port contributed by Andrew Stubbs <ams@codesourcery.com> 2019-01-15 10:48:08 -05:00
configure.in AMD GCN Port contributed by Andrew Stubbs <ams@codesourcery.com> 2019-01-15 10:48:08 -05:00