From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Aharon Landau <aharonl@nvidia.com>,
linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@nvidia.com>,
Mark Zhang <markzhang@nvidia.com>, Shay Drory <shayd@nvidia.com>
Subject: [PATCH rdma-rc 1/3] RDMA/mlx5: Don't remove cache MRs when a delay is needed
Date: Sun, 27 Mar 2022 10:55:46 +0300 [thread overview]
Message-ID: <73c3fef51ee2bb50ae240306472d9562ba05916f.1648366974.git.leonro@nvidia.com> (raw)
In-Reply-To: <cover.1648366974.git.leonro@nvidia.com>
From: Aharon Landau <aharonl@nvidia.com>
Don't remove MRs from the cache if need to delay the removal.
Fixes: b9358bdbc713 ("RDMA/mlx5: Fix locking in MR cache work queue")
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/mr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 8a87a2f074e4..4a01a0ad7c90 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -562,9 +562,10 @@ static void __cache_work_func(struct mlx5_cache_ent *ent)
spin_lock_irq(&ent->lock);
if (ent->disabled)
goto out;
- if (need_delay)
+ if (need_delay) {
queue_delayed_work(cache->wq, &ent->dwork, 300 * HZ);
- remove_cache_mr_locked(ent);
+ goto out;
+ }
queue_adjust_cache_locked(ent);
}
out:
--
2.35.1
next prev parent reply other threads:[~2022-03-27 7:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 7:55 [PATCH rdma-rc 0/3] Fixes for v5.17 Leon Romanovsky
2022-03-27 7:55 ` Leon Romanovsky [this message]
2022-03-29 7:25 ` [PATCH rdma-rc 1/3] RDMA/mlx5: Don't remove cache MRs when a delay is needed Leon Romanovsky
2022-03-27 7:55 ` [PATCH rdma-rc 2/3] RDMA/mlx5: Add a missing update of cache->last_add Leon Romanovsky
2022-03-27 7:55 ` [PATCH rdma-rc 3/3] IB/cm: Cancel mad on the DREQ event when the state is MRA_REP_RCVD Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73c3fef51ee2bb50ae240306472d9562ba05916f.1648366974.git.leonro@nvidia.com \
--to=leon@kernel.org \
--cc=aharonl@nvidia.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=markzhang@nvidia.com \
--cc=shayd@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox