From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Mark Zhang <markzhang@nvidia.com>,
linux-rdma@vger.kernel.org,
Michael Guralnik <michaelgur@nvidia.com>,
Or Har-Toov <ohartoov@nvidia.com>
Subject: Re: [PATCH rdma-next 2/4] RDMA/restrack: Release MR restrack when delete
Date: Wed, 9 Nov 2022 15:08:33 -0400 [thread overview]
Message-ID: <Y2v6sTD8docw5bjK@nvidia.com> (raw)
In-Reply-To: <703db18e8d4ef628691fb93980a709be673e62e3.1667810736.git.leonro@nvidia.com>
On Mon, Nov 07, 2022 at 10:51:34AM +0200, Leon Romanovsky wrote:
> From: Mark Zhang <markzhang@nvidia.com>
>
> The MR restrack also needs to be released when delete it, otherwise it
> cause memory leak as the task struct won't be released.
>
> Fixes: 13ef5539def7 ("RDMA/restrack: Count references to the verbs objects")
> Signed-off-by: Mark Zhang <markzhang@nvidia.com>
> Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> drivers/infiniband/core/restrack.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c
> index 1f935d9f6178..01a499a8b88d 100644
> --- a/drivers/infiniband/core/restrack.c
> +++ b/drivers/infiniband/core/restrack.c
> @@ -343,8 +343,6 @@ void rdma_restrack_del(struct rdma_restrack_entry *res)
> rt = &dev->res[res->type];
>
> old = xa_erase(&rt->xa, res->id);
> - if (res->type == RDMA_RESTRACK_MR)
> - return;
This needs more explanation, there was some good reason we needed to
avoid the wait_for_completion() for the driver allocated objects, but I
can't remember it anymore.
You added this code in the v2 of the original series, maybe it had
something to do with mlx4?
Jason
next prev parent reply other threads:[~2022-11-09 19:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 8:51 [PATCH rdma-next 0/4] Various core fixes Leon Romanovsky
2022-11-07 8:51 ` [PATCH rdma-next 1/4] RDMA/nldev: Use __nlmsg_put instead nlmsg_put Leon Romanovsky
2022-11-09 19:15 ` Jason Gunthorpe
2022-11-13 7:19 ` Leon Romanovsky
2022-11-14 14:17 ` Jason Gunthorpe
2022-11-15 7:52 ` Leon Romanovsky
2022-11-07 8:51 ` [PATCH rdma-next 2/4] RDMA/restrack: Release MR restrack when delete Leon Romanovsky
2022-11-09 19:08 ` Jason Gunthorpe [this message]
2022-11-10 9:35 ` Leon Romanovsky
2022-11-10 19:29 ` Jason Gunthorpe
2022-11-10 19:39 ` Leon Romanovsky
2022-11-10 19:47 ` Jason Gunthorpe
2022-11-07 8:51 ` [PATCH rdma-next 3/4] RDMA/core: Make sure "ib_port" is valid when access sysfs node Leon Romanovsky
2022-11-07 8:51 ` [PATCH rdma-next 4/4] RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port Leon Romanovsky
2022-11-15 7:59 ` [PATCH rdma-next 0/4] Various core fixes Leon Romanovsky
2022-11-15 7:59 ` (subset) " 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=Y2v6sTD8docw5bjK@nvidia.com \
--to=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=markzhang@nvidia.com \
--cc=michaelgur@nvidia.com \
--cc=ohartoov@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;
as well as URLs for NNTP newsgroup(s).