freebsd-skq/sys/conf
jhb 520aafe3ec 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-06-29 00:48:33 +00:00
..
config.mk
dtb.build.mk
dtb.mk
files Add an external mbuf buffer type that holds multiple unmapped pages. 2019-06-29 00:48:33 +00:00
files.amd64 Fix qlxgbe(4) static build. 2019-06-26 16:23:24 +00:00
files.arm Allow compiling ukbdmap.h on arm, since it appears to work fine. 2019-06-23 21:17:41 +00:00
files.arm64 sys: Remove DEV_RANDOM device option 2019-06-21 00:16:30 +00:00
files.i386
files.mips
files.powerpc Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
files.riscv
files.sparc64
kern.mk Add an external mbuf buffer type that holds multiple unmapped pages. 2019-06-29 00:48:33 +00:00
kern.opts.mk Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
kern.post.mk
kern.pre.mk
kmod_syms_prefix.awk
kmod_syms.awk
kmod.mk
ldscript.amd64
ldscript.arm
ldscript.arm64
ldscript.i386
ldscript.mips
ldscript.mips.cfe
ldscript.mips.mips64
ldscript.mips.octeon1
ldscript.powerpc
ldscript.powerpc64
ldscript.powerpcspe
ldscript.riscv
ldscript.set_padding
ldscript.sparc64
Makefile.amd64
Makefile.arm
Makefile.arm64
Makefile.i386
Makefile.mips
Makefile.powerpc
Makefile.riscv
Makefile.sparc64
makeLINT.mk Build an armv7 LINT kernel in addition to armv5 LINT. You might think this 2019-06-24 01:42:09 +00:00
makeLINT.sed
newvers.sh
NOTES Add pwm devices to NOTES. 2019-06-24 02:39:56 +00:00
options Add support for extended descriptor format to Altera mSGDMA driver. 2019-06-27 18:08:18 +00:00
options.amd64
options.arm
options.arm64
options.i386
options.mips
options.powerpc
options.riscv
options.sparc64
systags.sh
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE