freebsd-skq/sys/arm/allwinner
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
..
a10 Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
a13 Allwinner A13: Add clkng support 2017-11-08 21:24:06 +00:00
a20 sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
a31 allwinner: A31: Add ccung driver 2017-02-28 15:44:21 +00:00
a33 Allwinner: Add A33 support 2017-01-04 03:35:39 +00:00
a64 Fix building arm64 kernel after r310117 2016-12-15 17:26:16 +00:00
a83t allwinner/a83t_padconf: Rename "emac" function to "gmac" as per upstream DTS 2018-01-12 20:35:27 +00:00
clk Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
clkng Standardize SPDX tag on files I've added 2018-05-09 16:52:28 +00:00
h3 Allwinner H5: Enhance support 2017-12-05 21:21:23 +00:00
a10_ahci.c arm: Fix duplicate ahci DRIVER_MODULE 2018-04-27 21:05:18 +00:00
a10_codec.c Add support for Allwinner H3 audio codec. 2016-11-03 23:22:04 +00:00
a10_dmac.c Register the device's xref handle at attach time. 2016-11-02 23:53:47 +00:00
a10_dmac.h Add support for the Allwinner DMA controller. This will be used by the at 2016-02-15 19:56:35 +00:00
a10_ehci.c arm: Fix duplicate ehci DRIVER_MODULE 2018-04-27 21:05:58 +00:00
a10_fb.c EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions. 2016-07-10 18:28:15 +00:00
a10_hdmi.c Enable the SCL and SDA i2c line for DDC. 2016-11-24 01:24:26 +00:00
a10_hdmiaudio.c Add Allwinner A20 HDMI support. 2016-02-25 20:17:18 +00:00
a10_sramc.c sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
a10_sramc.h sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
a10_timer.c Rename timer.c to a10_timer.c 2017-02-07 19:28:32 +00:00
a31_dmac.c Add support for the integrated DMA controller found in the Allwinner A31, 2016-11-02 23:58:10 +00:00
allwinner_pinctrl.h Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
aw_ccu.c arm64: Add Allwinner H5 SoC 2017-08-02 20:19:19 +00:00
aw_cir.c Use hwreset_get_by_ofw_idx() function instead, since there is 2017-04-19 05:59:00 +00:00
aw_gpio.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
aw_if_dwc.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
aw_machdep.c uart_snps: Add early printf support 2018-05-01 13:57:08 +00:00
aw_machdep.h Allwinner: Add A33 support 2017-01-04 03:35:39 +00:00
aw_mmc.c aw_mmc: Rework regulator handling 2018-05-12 13:14:01 +00:00
aw_mmc.h aw_mmc: Do not fully init the controller in attach 2018-05-12 13:13:34 +00:00
aw_mp.c Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
aw_mp.h Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
aw_nmi.c aw_nmi: add support for a31/a83t's r_intc 2017-11-19 03:14:10 +00:00
aw_reset.c Attach hwreset resources at the same time as clock resources. 2016-04-08 23:07:16 +00:00
aw_rsb.c allwinner: Add support for P2WI in RSB driver 2016-10-24 20:33:42 +00:00
aw_rtc.c Remove dependency on allwinner_soc_family() as it is not available on arm64. 2016-08-25 10:14:56 +00:00
aw_sid.c aw_sid(4): Use prctl read for all reads when it's required 2018-04-06 15:17:09 +00:00
aw_sid.h Add support for the SID (Security ID Module) on Allwinner A10 and A20. 2016-07-20 11:23:06 +00:00
aw_spi.c aw_spi: Fix some silly clock mistake 2018-05-17 14:51:22 +00:00
aw_syscon.c Remove "All Rights Reserved" on files that I hold sole copyright on 2018-05-09 16:44:19 +00:00
aw_thermal.c On H3, initialize alarm and shutdown trip points and do temperature 2016-11-19 14:56:22 +00:00
aw_ts.c Stop including fdt_common.h from the arm code when it's unneeded. 2016-11-14 11:41:22 +00:00
aw_usbphy.c aw_usbphy: Move later to SUPPORTDEV pass 2018-03-06 22:45:45 +00:00
aw_wdog.c Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
aw_wdog.h Add support for the Allwinner A31 watchdog to the existing A10 watchdog 2016-02-25 16:50:36 +00:00
axp81x.c axp81x: Do not fail if regulators aren't properly defined 2018-04-07 14:17:17 +00:00
axp209.c Switch to iicdev_readfrom/writeto() to do xfers with proper bus ownership. 2017-08-03 18:43:54 +00:00
axp209reg.h Add support for AXP221 Power Management Unit. 2016-11-04 20:02:52 +00:00
files.allwinner Introduce aw_syscon(4) for earlier attachment 2018-01-13 18:46:31 +00:00
files.allwinner_up Rename timer.c to a10_timer.c 2017-02-07 19:28:32 +00:00
if_awg.c if_awg: Add support for allwinner,{tx,rx}-delay-ps bindings 2018-04-09 14:05:43 +00:00
if_awgreg.h Fix if_awg tx dma status reg offsets. 2017-09-30 10:34:07 +00:00
if_emac.c ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
if_emacreg.h sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
std.allwinner Make kernel option KERNVIRTADDR optional, remove it from std.<platform> 2017-12-30 00:20:49 +00:00
std.allwinner_up Make kernel option KERNVIRTADDR optional, remove it from std.<platform> 2017-12-30 00:20:49 +00:00
sunxi_dma_if.m Add support for the Allwinner DMA controller. This will be used by the at 2016-02-15 19:56:35 +00:00