OpenCloudOS-Kernel/include
Saeed Mahameed 02d92f7903 net/mlx5: CQ Database per EQ
Before this patch the driver had one CQ database protected via one
spinlock, this spinlock is meant to synchronize between CQ
adding/removing and CQ IRQ interrupt handling.

On a system with large number of CPUs and on a work load that requires
lots of interrupts, this global spinlock becomes a very nasty hotspot
and introduces a contention between the active cores, which will
significantly hurt performance and becomes a bottleneck that prevents
seamless cpu scaling.

To solve this we simply move the CQ database and its spinlock to be per
EQ (IRQ), thus per core.

Tested with:
system: 2 sockets, 14 cores per socket, hyperthreading, 2x14x2=56 cores
netperf command: ./super_netperf 200 -P 0 -t TCP_RR  -H <server> -l 30 -- -r 300,300 -o -s 1M,1M -S 1M,1M

WITHOUT THIS PATCH:
Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft %steal  %guest  %gnice   %idle
Average:     all    4.32    0.00   36.15    0.09    0.00   34.02   0.00    0.00    0.00   25.41

Samples: 2M of event 'cycles:pp', Event count (approx.): 1554616897271
Overhead  Command          Shared Object                 Symbol
+   14.28%  swapper          [kernel.vmlinux]              [k] intel_idle
+   12.25%  swapper          [kernel.vmlinux]              [k] queued_spin_lock_slowpath
+   10.29%  netserver        [kernel.vmlinux]              [k] queued_spin_lock_slowpath
+    1.32%  netserver        [kernel.vmlinux]              [k] mlx5e_xmit

WITH THIS PATCH:
Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
Average:     all    4.27    0.00   34.31    0.01    0.00   18.71    0.00    0.00    0.00   42.69

Samples: 2M of event 'cycles:pp', Event count (approx.): 1498132937483
Overhead  Command          Shared Object             Symbol
+   23.33%  swapper          [kernel.vmlinux]          [k] intel_idle
+    1.69%  netserver        [kernel.vmlinux]          [k] mlx5e_xmit

Tested-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Gal Pressman <galp@mellanox.com>
2018-02-15 00:29:54 -08:00
..
acpi ACPICA: Update version to 20180105 2018-02-06 10:32:13 +01:00
asm-generic RISC-V changes for 4.16 2018-02-07 11:33:08 -08:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-31 14:22:45 -08:00
drm drm/graphics pull request for v4.16-rc1 2018-02-01 17:48:47 -08:00
dt-bindings MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
keys
kvm KVM changes for 4.16 2018-02-10 13:16:35 -08:00
linux net/mlx5: CQ Database per EQ 2018-02-15 00:29:54 -08:00
math-emu
media vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
memory
misc powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
net vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
pcmcia
ras
rdma IB/core: Map iWarp AH type to undefined in rdma_ah_find_type 2018-02-01 15:43:31 -07:00
scsi SCSI postmerge on 20180202 2018-02-03 13:07:56 -08:00
soc ARM: SoC driver updates for 4.16 2018-02-01 16:35:31 -08:00
sound ASoC: Updates for v4.16 2018-02-07 12:11:09 -08:00
target target core: add device action configfs files 2018-01-16 18:05:04 -08:00
trace Char/Misc driver patches for 4.16-rc1 2018-02-01 10:31:17 -08:00
uapi unify {de,}mangle_poll(), get rid of kernel-side POLL... 2018-02-11 14:37:22 -08:00
video fbdev changes for v4.16: 2018-02-07 13:10:43 -08:00
xen