RDMA/mlx5: Delay emptying a cache entry when a new MR is added to it recently
authorAharon Landau <aharonl@nvidia.com>
Tue, 27 Jul 2021 07:16:06 +0000 (10:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:06 +0000 (13:22 +0200)
commite74551ba938aef92cb9b476339edb4604858a7f8
tree8067c21867dd7b22e74519f501e0dd883d65ba70
parent1242ca9369b17e1c67e570e9c8a397989d113683
RDMA/mlx5: Delay emptying a cache entry when a new MR is added to it recently

[ Upstream commit d6793ca97b76642b77629dd0783ec64782a50bdb ]

Fixing a typo that causes a cache entry to shrink immediately after adding
to it new MRs if the entry size exceeds the high limit.  In doing so, the
cache misses its purpose to prevent the creation of new mkeys on the
runtime by using the cached ones.

Fixes: b9358bdbc713 ("RDMA/mlx5: Fix locking in MR cache work queue")
Link: https://lore.kernel.org/r/fcb546986be346684a016f5ca23a0567399145fa.1627370131.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/mr.c