mirror-linux/include/linux/mlx5
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
..
cmd.h
cq.h net/mlx5: CQ Database per EQ 2018-02-15 00:29:54 -08:00
device.h net/mlx5: Set software owner ID during init HCA 2018-01-08 11:42:20 -07:00
doorbell.h
driver.h net/mlx5: CQ Database per EQ 2018-02-15 00:29:54 -08:00
fs.h net/mlx5: Separate ingress/egress namespaces for each vport 2017-12-29 00:43:52 +02:00
mlx5_ifc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-01-31 14:31:10 -08:00
mlx5_ifc_fpga.h net/mlx5: Accel, Add IPSec acceleration interface 2017-06-27 16:36:47 +03:00
port.h net/mlx5: QPTS and QPDPM register firmware command support 2017-11-04 21:26:21 -07:00
qp.h net/mlx5: Add DCT command interface 2018-01-08 11:38:49 -07:00
srq.h net/mlx5: Add XRQ support 2017-08-29 08:30:20 -04:00
transobj.h net/mlx5: Enable setting hairpin queue size 2018-01-19 22:41:32 +02:00
vport.h {net, IB}/mlx5: Manage port association for multiport RoCE 2018-01-08 11:42:22 -07:00