Re: [PATCH rdma-next 3/7] RDMA/mlx5: Store in the cache mkeys instead of mrs

Jason Gunthorpe
2021-12-08T20:44:41Z

On Mon, Dec 06, 2021 at 11:10:48AM +0200, Leon Romanovsky wrote:
> From: Aharon Landau <aharonl@nvidia.com>
>
> Currently, the driver stores the entire mlx5_ib_mr struct in the cache,
> although the only use of the cached MR is the mkey. Store only the mkey
> in the cache.
>
> Signed-off-by: Aharon Landau <aharonl@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> drivers/infiniband/hw/mlx5/mlx5_ib.h | 21 ++---
> drivers/infiniband/hw/mlx5/mr.c | 135 +++++++++++++--------------
> 2 files changed, 71 insertions(+), 85 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> index d0224f468169..9b12e970ca01 100644
> +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> @@ -668,14 +668,6 @@ struct mlx5_ib_mr {

Shouldn't this delete cache_ent too?

Jason