]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Convert mkey_table to XArray
authorMatthew Wilcox <willy@infradead.org>
Thu, 20 Jun 2019 07:03:47 +0000 (07:03 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 24 Jun 2019 23:44:40 +0000 (16:44 -0700)
commit4696bf100277351e6bcb2eccdf12f4a0f524c2aa
tree9b634d93c26bbc9124dc45271e1fe021008d2ec1
parent53c9d73e7480f0d9a2c84dcffd097c26188dc45b
net/mlx5: Convert mkey_table to XArray

The lock protecting the data structure does not need to be an rwlock.  The
only read access to the lock is in an error path, and if that's limiting
your scalability, you have bigger performance problems.

Eliminate mlx5_mkey_table in favour of using the xarray directly.
reg_mr_callback must use GFP_ATOMIC for allocating XArray nodes as it may
be called in interrupt context.

This also fixes a minor bug where SRCU locking was being used on the radix
tree read side, when RCU was needed too.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/devx.c
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/odp.c
drivers/net/ethernet/mellanox/mlx5/core/mr.c
include/linux/mlx5/driver.h
include/linux/mlx5/qp.h