On Wed, Feb 20, 2019 at 04:20:38PM -0800, Matthew Wilcox wrote: > 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. > Continue to use GFP_ATOMIC for allocating XArray nodes as we may be > called in interrupt context. > > Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxx> > drivers/infiniband/hw/mlx5/cq.c | 4 ++-- > drivers/infiniband/hw/mlx5/mr.c | 10 +++++----- > 2 files changed, 7 insertions(+), 7 deletions(-) This patch doesn't compile.. drivers/infiniband/hw/mlx5/cq.c: In function ‘mlx5_poll_one’: ./include/linux/xarray.h:444:39: error: ‘struct mlx5_mkey_table’ has no member named ‘xa_lock’; did you mean ‘lock’? #define xa_lock(xa) spin_lock(&(xa)->xa_lock) ^~~~~~~ drivers/infiniband/hw/mlx5/cq.c:525:3: note: in expansion of macro ‘xa_lock’ xa_lock(&dev->mdev->priv.mkey_table); ^~~~~~~ ./include/linux/xarray.h:445:43: error: ‘struct mlx5_mkey_table’ has no member named ‘xa_lock’; did you mean ‘lock’? #define xa_unlock(xa) spin_unlock(&(xa)->xa_lock) ^~~~~~~ drivers/infiniband/hw/mlx5/cq.c:540:3: note: in expansion of macro ‘xa_unlock’ xa_unlock(&dev->mdev->priv.mkey_table); ^~~~~~~~~ scripts/Makefile.build:276: recipe for target 'drivers/infiniband/hw/mlx5/cq.o' failed make[4]: *** [drivers/infiniband/hw/mlx5/cq.o] Error 1 make[4]: *** Waiting for unfinished jobs.... drivers/infiniband/hw/mlx5/mr.c: In function ‘reg_mr_callback’: drivers/infiniband/hw/mlx5/mr.c:133:25: error: initialization of ‘struct xarray *’ from incompatible pointer type ‘struct mlx5_mkey_table *’ [-Werror=incompatible-pointer-types] struct xarray *mkeys = &dev->mdev->priv.mkey_table; ^ cc1: some warnings being treated as errors The change to the header file is missing. I think we will find other readers than just MLX5_CQE_SIG_ERR when the patch is made complete. Jason