diff options
author | Eric Dumazet <edumazet@google.com> | 2016-11-20 09:24:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-21 11:33:31 -0500 |
commit | dad42c3038a59d27fced28ee4ec1d4a891b28155 (patch) | |
tree | fa0c1fdd84ef243b364948e662ab9b72b1bb09f0 /net/unix/af_unix.c | |
parent | b668534c1d9b80f4cda4d761eb11d3a6c9f4ced8 (diff) |
mlx4: avoid unnecessary dirtying of critical fields
While stressing a 40Gbit mlx4 NIC with busy polling, I found false
sharing in mlx4 driver that can be easily avoided.
This patch brings an additional 7 % performance improvement in UDP_RR
workload.
1) If we received no frame during one mlx4_en_process_rx_cq()
invocation, no need to call mlx4_cq_set_ci() and/or dirty ring->cons
2) Do not refill rx buffers if we have plenty of them.
This avoids false sharing and allows some bulk/batch optimizations.
Page allocator and its locks will thank us.
Finally, mlx4_en_poll_rx_cq() should not return 0 if it determined
cpu handling NIC IRQ should be changed. We should return budget-1
instead, to not fool net_rx_action() and its netdev_budget.
v2: keep AVG_PERF_COUNTER(... polled) even if polled is 0
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions