Skip to content

Commit 7340399

Browse files
Daniel Jurgensgregkh
authored andcommitted
IB/mlx5: Use cache line size to select CQE stride
commit 16b0e0695a73b68d8ca40288c8f9614ef208917b upstream. When creating kernel CQs use 128B CQE stride if the cache line size is 128B, 64B otherwise. This prevents multiple CQEs from residing in a 128B cache line, which can cause retries when there are concurrent read and writes in one cache line. Tested with IPoIB on PPC64, saw ~5% throughput improvement. Fixes: e126ba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7cf5b78 commit 7340399

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • drivers/infiniband/hw/mlx5

drivers/infiniband/hw/mlx5/cq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,7 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,
787787
if (err)
788788
goto err_create;
789789
} else {
790-
/* for now choose 64 bytes till we have a proper interface */
791-
cqe_size = 64;
790+
cqe_size = cache_line_size() == 128 ? 128 : 64;
792791
err = create_cq_kernel(dev, cq, entries, cqe_size, &cqb,
793792
&index, &inlen);
794793
if (err)

0 commit comments

Comments
 (0)