freebsd-skq/sys/contrib
mmacy 7aeac9ef18 ifnet: Replace if_addr_lock rwlock with epoch + mutex
Run on LLNW canaries and tested by pho@

gallatin:
Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5
based ConnectX 4-LX NIC, I see an almost 12% improvement in received
packet rate, and a larger improvement in bytes delivered all the way
to userspace.

When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,
I see, using nstat -I mce0 1 before the patch:

InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw     irq GBfree
4.98   0.00   4.42   0.00 4235592     33   83.80 4720653 2149771   1235 247.32
4.73   0.00   4.20   0.00 4025260     33   82.99 4724900 2139833   1204 247.32
4.72   0.00   4.20   0.00 4035252     33   82.14 4719162 2132023   1264 247.32
4.71   0.00   4.21   0.00 4073206     33   83.68 4744973 2123317   1347 247.32
4.72   0.00   4.21   0.00 4061118     33   80.82 4713615 2188091   1490 247.32
4.72   0.00   4.21   0.00 4051675     33   85.29 4727399 2109011   1205 247.32
4.73   0.00   4.21   0.00 4039056     33   84.65 4724735 2102603   1053 247.32

After the patch

InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw     irq GBfree
5.43   0.00   4.20   0.00 3313143     33   84.96 5434214 1900162   2656 245.51
5.43   0.00   4.20   0.00 3308527     33   85.24 5439695 1809382   2521 245.51
5.42   0.00   4.19   0.00 3316778     33   87.54 5416028 1805835   2256 245.51
5.42   0.00   4.19   0.00 3317673     33   90.44 5426044 1763056   2332 245.51
5.42   0.00   4.19   0.00 3314839     33   88.11 5435732 1792218   2499 245.52
5.44   0.00   4.19   0.00 3293228     33   91.84 5426301 1668597   2121 245.52

Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch

Reviewed by:	gallatin
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D15366
2018-05-18 20:13:34 +00:00
..
alpine-hal Update Annapurna Alpine HAL 2016-09-20 09:19:22 +00:00
ck ck: add support for executing callbacks outside of main poll loop 2018-05-17 18:14:10 +00:00
cloudabi Import the latest CloudABI definitions, v0.18. 2017-11-21 20:46:21 +00:00
dev Quiesce a couple pages of clang warnings with a cast. Duplicates 2018-05-18 17:23:23 +00:00
edk2 Copy needed include files from EDK2. This is a minimal set gleened 2017-03-08 02:47:59 +00:00
ena-com Apply fixes in ena-com 2018-05-10 09:25:51 +00:00
ipfilter/netinet ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
libb2 MFV: libb2: use native calls for secure memory clearance 2018-03-27 14:55:01 +00:00
libfdt MFV r328490: Update libfdt to github:f1879e1 2018-01-27 21:25:45 +00:00
libnv Add SPDX tags for nv(9). 2018-01-27 12:58:21 +00:00
ncsw Rename a couple files to not conflict with ZFS filenames 2017-11-01 03:09:16 +00:00
ngatm
octeon-sdk Use the correct board name for the Ubiquiti Unifi Security Gateway 2017-11-14 03:21:39 +00:00
rdma/krping Add support for setting type of service, TOS, for outgoing RDMA connections 2018-05-15 07:46:24 +00:00
v4l
vchiq/interface vchiq: Use mallocarray() to provide kcalloc() 2018-01-07 13:41:06 +00:00
x86emu Optimize ROL and ROR emulations and fix comments. 2016-02-18 23:03:37 +00:00
xz-embedded
zstd Update to Zstandard 1.3.4 2018-03-26 23:54:59 +00:00