RDMA/mlx5: Add work to remove temporary entries from the cache
authorMichael Guralnik <michaelgur@nvidia.com>
Wed, 25 Jan 2023 22:28:07 +0000 (00:28 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Jan 2023 17:15:23 +0000 (13:15 -0400)
commit627122280c878cf5d3cda2d2c5a0a8f6a7e35cb7
tree01d3310ff4953f3935cf6a987197fd9ae5632ad0
parentdd1b913fb0d0e3e6d55e92d2319d954474dd66ac
RDMA/mlx5: Add work to remove temporary entries from the cache

The non-cache mkeys are stored in the cache only to shorten restarting
application time. Don't store them longer than needed.

Configure cache entries that store non-cache MRs as temporary entries.  If
30 seconds have passed and no user reclaimed the temporarily cached mkeys,
an asynchronous work will destroy the mkeys entries.

Link: https://lore.kernel.org/r/20230125222807.6921-7-michaelgur@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/odp.c