From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>, Shay Drory <shayd@nvidia.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/restrack: Delay QP deletion till all users are gone
Date: Sun, 25 Apr 2021 10:08:57 -0300 [thread overview]
Message-ID: <20210425130857.GN1370958@nvidia.com> (raw)
In-Reply-To: <YIVosxurbZGlmCOw@unreal>
On Sun, Apr 25, 2021 at 04:03:47PM +0300, Leon Romanovsky wrote:
> On Thu, Apr 22, 2021 at 11:29:39AM -0300, Jason Gunthorpe wrote:
> > On Wed, Apr 21, 2021 at 08:03:22AM +0300, Leon Romanovsky wrote:
> >
> > > I didn't understand when reviewed either, but decided to post it anyway
> > > to get possible explanation for this RDMA_RESTRACK_MR || RDMA_RESTRACK_QP
> > > check.
> >
> > I think the whole thing should look more like this and we delete the
> > if entirely.
>
> I have mixed feelings about this approach. Before "destroy can fail disaster",
> the restrack goal was to provide the following flow:
> 1. create new memory object - rdma_restrack_new()
> 2. create new HW object - .create_XXX() callback in the driver
> 3. add HW object to the DB - rdma_restrack_del()
> ....
> 4. wait for any work on this HW object to complete - rdma_restrack_del()
> 5. safely destroy HW object - .destroy_XXX()
>
> I really would like to stay with this flow and block any access to the
> object that failed to destruct - maybe add to some zombie list.
That isn't the semantic we now have for destroy.
> The proposed prepare/abort/finish flow is much harder to implement correctly.
> Let's take as an example ib_destroy_qp_user(), we called to rdma_rw_cleanup_mrs(),
> but didn't restore them after .destroy_qp() failure.
I think it is a bug we call rdma_rw code in a a user path.
Jason
next prev parent reply other threads:[~2021-04-25 13:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-18 13:37 [PATCH rdma-next] RDMA/restrack: Delay QP deletion till all users are gone Leon Romanovsky
2021-04-20 12:39 ` Jason Gunthorpe
2021-04-20 13:06 ` Leon Romanovsky
2021-04-20 15:25 ` Jason Gunthorpe
2021-04-21 5:03 ` Leon Romanovsky
2021-04-22 14:29 ` Jason Gunthorpe
2021-04-25 13:03 ` Leon Romanovsky
2021-04-25 13:08 ` Jason Gunthorpe [this message]
2021-04-25 13:44 ` Leon Romanovsky
2021-04-25 17:22 ` Jason Gunthorpe
2021-04-25 17:38 ` Leon Romanovsky
2021-04-26 12:03 ` Jason Gunthorpe
2021-04-26 13:08 ` Leon Romanovsky
2021-04-26 13:11 ` Jason Gunthorpe
2021-04-27 4:45 ` Leon Romanovsky
2021-05-02 11:28 ` 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=20210425130857.GN1370958@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).