freebsd-skq/sys/conf
Robert Watson 52cd27cb58 Implement a CPU-affine TCP and UDP connection lookup data structure,
struct inpcbgroup.  pcbgroups, or "connection groups", supplement the
existing inpcbinfo connection hash table, which when pcbgroups are
enabled, might now be thought of more usefully as a per-protocol
4-tuple reservation table.

Connections are assigned to connection groups base on a hash of their
4-tuple; wildcard sockets require special handling, and are members
of all connection groups.  During a connection lookup, a
per-connection group lock is employed rather than the global pcbinfo
lock.  By aligning connection groups with input path processing,
connection groups take on an effective CPU affinity, especially when
aligned with RSS work placement (see a forthcoming commit for
details).  This eliminates cache line migration associated with
global, protocol-layer data structures in steady state TCP and UDP
processing (with the exception of protocol-layer statistics; further
commit to follow).

Elements of this approach were inspired by Willman, Rixner, and Cox's
2006 USENIX paper, "An Evaluation of Network Stack Parallelization
Strategies in Modern Operating Systems".  However, there are also
significant differences: we maintain the inpcb lock, rather than using
the connection group lock for per-connection state.

Likewise, the focus of this implementation is alignment with NIC
packet distribution strategies such as RSS, rather than pure software
strategies.  Despite that focus, software distribution is supported
through the parallel netisr implementation, and works well in
configurations where the number of hardware threads is greater than
the number of NIC input queues, such as in the RMI XLR threaded MIPS
architecture.

Another important difference is the continued maintenance of existing
hash tables as "reservation tables" -- these are useful both to
distinguish the resource allocation aspect of protocol name management
and the more common-case lookup aspect.  In configurations where
connection tables are aligned with hardware hashes, it is desirable to
use the traditional lookup tables for loopback or encapsulated traffic
rather than take the expense of hardware hashes that are hard to
implement efficiently in software (such as RSS Toeplitz).

Connection group support is enabled by compiling "options PCBGROUP"
into your kernel configuration; for the time being, this is an
experimental feature, and hence is not enabled by default.

Subject to the limited MFCability of change dependencies in inpcb,
and its change to the inpcbinfo init function signature, this change
in principle could be merged to FreeBSD 8.x.

Reviewed by:    bz
Sponsored by:   Juniper Networks, Inc.
2011-06-06 12:55:02 +00:00
..
defines
files Implement a CPU-affine TCP and UDP connection lookup data structure, 2011-06-06 12:55:02 +00:00
files.amd64 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.arm Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.i386 Add I2C bus driver for the AMD Geode LX series CS5536 Companion 2011-05-15 14:01:23 +00:00
files.ia64 Stop linking against a direct-mapped virtual address and instead 2011-04-30 20:49:00 +00:00
files.mips Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.pc98 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.powerpc Add new fan controller driver for the G4 MDD PowerMac. Submitted and tested 2011-06-04 15:17:35 +00:00
files.sparc64 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
kern.mk Remove an outdated comment as requested by Bruce Evans in a private email to 2011-05-24 09:01:56 +00:00
kern.post.mk Test against "no" rather than "yes" for MK_KERNEL_SYMBOLS 2011-05-23 21:32:45 +00:00
kern.pre.mk Allow MKMODULESENV being preset from other sources like makeoptions 2011-04-30 17:51:39 +00:00
kmod_syms.awk
kmod.mk Test against "no" rather than "yes" for MK_KERNEL_SYMBOLS 2011-05-23 21:32:45 +00:00
ldscript.amd64 The new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000 2011-03-28 06:35:17 +00:00
ldscript.arm
ldscript.i386 Step 2: sync sys/conf/ldscript.i386 with the binutils 2.17.50 version, 2010-11-05 19:40:27 +00:00
ldscript.ia64 Stop linking against a direct-mapped virtual address and instead 2011-04-30 20:49:00 +00:00
ldscript.mips Let the linker pick the right output format automatically 2010-11-13 18:38:35 +00:00
ldscript.mips.cfe Remove commented out _DYNAMIC sections. 2011-01-20 19:20:23 +00:00
ldscript.mips.mips64 Remove commented out _DYNAMIC sections. 2011-01-20 19:20:23 +00:00
ldscript.mips.octeon1 In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.powerpc In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.powerpc64 In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.sparc64 Merge binutils 2.17.50 to head. This brings a number of improvements to 2011-02-18 20:54:12 +00:00
Makefile.amd64 Upgrade our copy of llvm/clang to r126079, from upstream's trunk. 2011-02-20 19:33:47 +00:00
Makefile.arm Convert Marvell ARM platforms to FDT convention. 2010-06-13 13:28:53 +00:00
Makefile.i386 Upgrade our copy of llvm/clang to r126079, from upstream's trunk. 2011-02-20 19:33:47 +00:00
Makefile.ia64 Remove definition of the GCC3 variable. It was introduced in rev. 2007-06-02 21:30:39 +00:00
Makefile.mips Remove unnecessary 'cat'. 2011-01-10 05:13:06 +00:00
Makefile.pc98
Makefile.powerpc MFppc64: 2010-07-13 05:32:19 +00:00
Makefile.sparc64
makeLINT.mk Add LINT-NOINET6 which we have inofficially supported for years 2011-05-02 22:54:24 +00:00
makeLINT.sed
newvers.sh expr -> sh arithmetic expansion 2011-05-23 19:57:12 +00:00
NOTES These are of course i386/amd64 only. 2011-05-01 19:05:54 +00:00
options Implement a CPU-affine TCP and UDP connection lookup data structure, 2011-06-06 12:55:02 +00:00
options.amd64 Merging mptable under x86 left this option undefined for amd64 case. 2010-10-29 18:38:36 +00:00
options.arm Add options I missed in the additionnal AT91 support commits. 2010-10-07 09:30:35 +00:00
options.i386 Make "options XENHVM" compile for i386, not just amd64 -- a largely 2011-01-04 14:49:54 +00:00
options.ia64 Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
options.mips Put the ARGE_DEBUG behind a kernel config option. 2011-04-05 05:29:10 +00:00
options.pc98 Unbreak the build for pc98. Specify the newly introduced, for ia32, 2010-01-16 12:24:12 +00:00
options.powerpc Import support for the Sony Playstation 3 using the OtherOS feature 2011-01-06 04:12:29 +00:00
options.sparc64 Add a driver for the `Fire' JBus to PCIe bridges found in at least 2009-12-27 16:55:44 +00:00
systags.sh