projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84c2362
)
RDMA/mlx5: Add a missing update of cache->last_add
author
Aharon Landau
<aharonl@nvidia.com>
Mon, 4 Apr 2022 08:58:04 +0000
(11:58 +0300)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Mon, 4 Apr 2022 13:32:02 +0000
(10:32 -0300)
Update cache->last_add when returning an MR to the cache so that the cache
work won't remove it.
Fixes: b9358bdbc713 ("RDMA/mlx5: Fix locking in MR cache work queue")
Link:
https://lore.kernel.org/r/c99f076fce4b44829d434936bbcd3b5fc4c95020.1649062436.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mr.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/mr.c
b/drivers/infiniband/hw/mlx5/mr.c
index 45b0680377ec6f2c26e6fd3946d4801af7c63d68..32ef67e9a6a7295330b5beaeab832574abc307c9 100644
(file)
--- a/
drivers/infiniband/hw/mlx5/mr.c
+++ b/
drivers/infiniband/hw/mlx5/mr.c
@@
-627,6
+627,7
@@
static void mlx5_mr_cache_free(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
{
struct mlx5_cache_ent *ent = mr->cache_ent;
+ WRITE_ONCE(dev->cache.last_add, jiffies);
spin_lock_irq(&ent->lock);
list_add_tail(&mr->list, &ent->head);
ent->available_mrs++;